Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 see the same thing after i tookthe sourcetree update.

Ditto.  Let me know if anyone finds a solution.


Ditto - same exact issue.

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

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?

I have the same issue with 2.6.3. 

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

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

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.

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

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

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.

Suggest an answer

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

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

4,318 views 4 8
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