Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

P.S: the command line is working, I am forced to use this at the moment, but I prefer to use Source Tree in my job.

like image 619
Ferie Avatar asked Jan 28 '26 22:01

Ferie


1 Answers

There is nothing you can do about it.

Git for windows has a limit of 260 characters in the file name.
For unix its supporting up to 4096 characters.

The full discussion can be found here. (MAX_PATH) https://github.com/msysgit/git/pull/110

It has nothing to do with Sourcetree its pure git limitation as you can see here as well:
https://gitlab.com/tortoisegit/tortoisegit/issues/1017

like image 133
CodeWizard Avatar answered Jan 31 '26 17:01

CodeWizard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!