Source Tree Error Please Help

fatal: Unable to create 'C:/Users/Jon/Documents/DoomCarts/.git/index.lock': File exists.

If no other git process is currently running, this probably means a

git process crashed in this repository earlier. Make sure no other git

process is running and remove the file manually to continue.

How can we commit?

4 answers

This widget could not be displayed.

Hi Dfg,

If you're not running other GIT process, just delete the C:/Users/Jon/Documents/DoomCarts/.git/index.lock file and try again.

Kind Regards,
Henrique Lechner

Correct. Which is what the error message is telling you to do.

If you can't find the .git folder, you may need to change your Windows File Explorer options to show hidden folders, or type the path directly into your address bar.

This widget could not be displayed.

I get this a lot when switching branch. Sometimes it's enough to just wait a couple of seconds and then try again. Other times I need to Exit SourceTree and start it up again before being able to switch branch.

This widget could not be displayed.

This is a known bug: https://jira.atlassian.com/browse/SRCTREEWIN-5639

You should open that bug and vote for it, to give it more priority.

 

As a work-around, use the solution proposed by Henrique Lechner:

If you're not running other GIT process, just delete the C:/Users/Jon/Documents/DoomCarts/.git/index.lock file and try again.

This widget could not be displayed.

This happened to me and while sourcetree kept telling me the lock file existed, there was no such a file there for me to remove. So I just checked out another branch and then returned to the original branch and noticed this change fixed the issue.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

710 views 1 3
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you