1

In the question regarding Changing .gitconfig location on Windows, Joe Brinkman gave this answer, https://stackoverflow.com/a/37755334/9486497.

For users whom have a network directory declared as their $HOME directory by their organization, his answer seems to be the most logical, in the sense that it works with the Git tool without attempting to redefine an environment variable (which many users will not have Administrator rights to accomplish).

How does one properly utilize the INCLUDE tool in Git to point the .gitconfig file to another location? My code:

[include]
path = c:\users\userid\.mygitconfig

When I go to check that it works i get a fatal: bad config line 2 in file H://.gitconfig error.

1 Answer 1

1

I figured out that my code was a syntactical error. Due to the GitBash environment's LINUX base. LINUX uses forward slashes in pathing while Windows copy/paste, which I used, has back slashes. INCORRECT :

[include]
path = c:\users\userid\.mygitconfig

Should have been :

[include]
path = c:/users/userid/.mygitconfig
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.