Using INCLUDE for git config Source

In the question regarding Changing .gitconfig location on Windows, Joe Brinkman gave this answer,

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:

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.



answered 2 weeks ago #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 :

path = c:\users\userid\.mygitconfig

Should have been :

path = c:/users/userid/.mygitconfig

comments powered by Disqus