Create
cancel
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

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

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.

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 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 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
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

5,011 views 0 12
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