git commit – failed – “git rename from ‘.git/index.lock’ to ‘.git/index’ failed”


Issued git commit, but failing.


Error Image


Error Message

rename from '.git/index.lock' to '.git/index' failed. Should I try again? (y/n) y



Accessed the .git folder and noticed that a file named index already exists.


That file’s existence is likely why git commit is unable to rename index.lock to index.



Rename the existing index file to something out of the way such as index.[TS] that is index.20190329.1010PM

Re-Issue commit command.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s