Source Tree error: 'git status' failed with code 1: error launching git: the filename or extension is too long

I have used Source Tree with the same repository and the same paths for months (in a Windows environment) then suddenly last Monday, this error has started to appear when the program is opening the repository.

I have already tried with the command line 

git config --system core.longpaths true

to avoids the length of the paths in a Windows environment, but it does not wok.

Any idea?

But most important: why it has worked perfectly since the beginning and only now there is this problem?

3 answers

1 accepted

Try git operations from the command line (fetch, checkout, branch, push, etc). If they have the same error, then you should take your question to a site like StackOverflow that has a larger number of git "power users", as compared to the UI-users that are subscribed to the "sourcetree" tag on this site.

If the command line works, then it sounds to me like you've got a candidate for a bug report at jira.atlassian.com.

I am forced to use the command line right now, so, yes, the command line is working, the problem is with Source Tree!

Long Path Tool helped me in this situation.

I would also suggest you try the Long Path Tool. It's simple to use and it really does the trick :)

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

231 views 0 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot