user19492402
user19492402

Reputation:

Git config not located in default path

When I run "git config --system core.longpaths true" in CMD I get an error "could not lock config file %HOMEDRIVE%%HOMEPATH%/.gitconfig: No such file or directory". I know that the reason is that my .gitconfig file is located not in a default path.

Is there any way to solve this? Can I pass somehow path to my config file?

Upvotes: 0

Views: 283

Answers (1)

LeGEC
LeGEC

Reputation: 51780

There is a difference between :

  • git config --system : do stuff with a system-wide git config file, which is generally in a place where you must be root/administrator to edit it

and

  • git config --global (which is actually global to your user account only) : the file is located in your $HOME/.gitconfig, and can be edited with your normal user account

You very probably want to run

git config --global core.longpaths true

Upvotes: 1

Related Questions