Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

SourceTree repeatedly losing track of index.lock

Every time I try to make a change in my branch, SourceTree creates an index.lock file in the .git directory, then refuses to make the change because an index.lock file exists. Deleting the lock file doesn't help, as SourceTree will just create it again. Any suggestions?

11 answers

I'm also seeing this VERY frequently in 2.7.6 (macOS 10.12.6). Has being occurring intermittently for quite a few versions now. Seems to be most common for me when the system is under high CPU load from other processes.

I still see this on 2.7.1 on macOS very regularly. I think it's a race condition somewhere in source tree as sometimes it causes it and sometimes it can sort itself out.

I have had success with closing sourctree and deleting .git/index.lock from the command line

Getting this in v2.4.7.0 on Win10 time to time.
SourceTree creates and removes git.lock file repeatedly. 

Getting this in v2.4.7.0 on Win10. 

Edit: It started working again right after I posted this so I think it's an intermittent issue.

Same here with 2.7. That really sucks! Atlassian please fix it. That would save my x-mas days.

I have the same issue with 2.6.3. 

It is annoying to delete index.lock by hand after every activity.

I just did an update to 2.6.3 and the index.lock issue is back again! It seems that Sourcetree creates the index.lock, then does the commit or whatever task you trigger, and at the end does not delete index.lock anymore. I manually have to delete index.lock every time I trigger an action. When will this be fixed?

Still a problem in v1.9.6.2, especially interactive rebase. Please vote on this issue to get someone working on it:

Ditto - same exact issue.

Ditto.  Let me know if anyone finds a solution.


i see the same thing after i tookthe sourcetree update.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

61,947 views 127 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you