-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git: fatal: Unable to create '.git/index.lock': File exists. #1044
Comments
I also have the problem. Why close the issue ? |
Because it has nothing to do with cmder, it's a git problem. |
Can you tell me how to solve the problem ? Just update git ? |
Yeah that would be the only thing that could help, otherwise create a ticket over at git-for-windows |
thx a lot, I'd like to search about it. |
Do you sure that you don't have another Cmder tab with opened the same git folder? Everything must be ok if you close another. |
I have the same issue, with another command git mergetool and I think it is a cmder issue because If I do the steps inside a window prompt, there is no problem. |
The problem is definitely with Cmder or ConEmu. It spawns a git process that never closes each time it displays the prompt line (so if you are in a directory which is also a git repo, on each enter press you get a new process spawned). One of those git processes produces a index.lock file which prevents any other git process to operate on the repo. |
It seems to be the same issue as here: #1060 |
Same issue here. Also confirmed that if I run the same commands in a windows command prompt everything is fine. However in cmder the issue persists. The index.lock file appears when I do a 'git add .' from then on the lock file is there. Can't do a commit after that... |
Same for me. It's spawning git processes which do not end leaving you with an index.lock which you cannot delete since the process is still running. |
Same for me... a new git process spawns every time I enter the directory. |
Same problem here. Just installed git for windows and used git bash to add,commit and push things to github. This problem is definitely with Cmder. Its sad to see such an excellent terminal has this problem 😭 |
I'm also having this problem, and it seems to be caused by cmder. When cmder is open, there's the index.lock file in the .git folder of my project. As soon as I close cmder, it is deleted. A way to fix this issue for me is to close cmder and use git bash instead to push to my repo or do whatever I want to do. Once that's done, I can re-open cmder and the index.lock file will not be created, I can use cmder again for git operations. |
Fixed in #1101 |
@MartiUK , how can I use it? I see the release version is still 1.3.1. Should I build it by myself? Is there a documentation? I'm sorry I'm new to this. |
@ogrishman The latest development builds are always here: https://ci.appveyor.com/project/MartiUK/cmder/build/artifacts |
@MartiUK, Thank you! |
I'm having the same issue with latest v1.3.1 of Cmder, it is still spawning multiple Git for Windows processes as soons as I cd into a local repository EDIT: sorry, didn't see @ogrishman comment, thanks ;) |
Same problem here |
rm .git/index.lock |
@daxgames it is not a solution, bundled git.exe always create new index.lock and prevents commiting. Solved in the latest build though |
it's locked,you can use GUI to unlock it and then everything will be fine, i just tried it |
@WillJE Why should anyone have to unlock it? Something within the application keeps causing it to lock. Manually unlocking it gets you by one time, but this is a recurring issue. Your saying we should have to manually go in and unlock it every time it glitches out? That is not a solution, it's called a band-aid fix. |
For anyone ran into the same issue with index lock, there's a workaround that disabling Hope this help for you guys. |
Might get a real fix soon git-for-windows/msys2-runtime@78e2dee |
Problem:Another git process seems to be running in this repository, e.g. Solution:
|
the above solution worked for me thanks |
@AnilKumar345 |
Thought it worked at first, but once cmder is open and I go on my repo, the git starts up and an empty index.lock pops up. If I kill the git instance with the task manager, and then delete the file, it works. |
Though there is an alternative above, but that didn't solve my situation. |
solution : rm -Force ./.git/index.lock |
If you are getting the same error then please follow the below steps. goto .git in the folder location now check everything will work |
Hey! If you guys are using MAC osx, try this solution : remove the old file wich probaly has some crushed process git -> Then, after initialize the new one-> |
@lucas0000miranda how does this have anything to do with cmder if you are on mac osx given cmder is a Windows only app? |
@daxgames hmmm not sure. I just put that in context make sure that this implementation will work for MAC users. |
@daxgames and also this is a issue in index.lock file on GIT in general. Not just for cmder. |
I am facing same issue saying /index.lock with "another git process seems to be running.. " on my command line Git Bash terminal |
How u done ..........................where i have to open local repositary |
@AnilKumar345 |
Git is unable to create
.git/index.lock
file because it already exists. Steps to reproduce using files that are readily available:user.name
anduser.email
git commit -m "test"
An error like this shows up:
.git
directory shows that anindex.lock
file exists.The text was updated successfully, but these errors were encountered: