3

I can't launch repositories on sourcetree.

I get:

bad numeric config value 'tru' for 'core.longpaths': invalid unit

It's happened after I tried to clone a project with a long file name.
And then i tried to enable the "core.longpaths".

How to fix it please?

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
Anna
  • 498
  • 5
  • 24

1 Answers1

4

Simply edit your global git config named .gitconfig in your $HOME (or %USERPROFILE% on Windows)

You need to replace tru with true or delete core.longpaths altogether from your global settings.

In command line, you can also type:

git config --global unset core.longpaths
cd /path/to/my/repo
git config core.longpaths true

Checks your SourceTree settings though: make sure it is using the System’s Git and not the embedded one.

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • I would first set it as a local config before trying to apply that to *all* repo through a global or system setting – VonC Sep 24 '16 at 08:29
  • Thank's i just change the git setting to "System git" – Anna Sep 24 '16 at 08:59
  • @Anna Well done. That way, SourceTree and command-line both are using the same settings. Easier that way. – VonC Sep 24 '16 at 09:03