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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

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...

561 views 1 2
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