On Windows 7 (maybe the same or similar for Windows 10), for Visual Studio and the Git command line, your global configuration is in:
%USERPROFILE%\.gitconfig
(dot is in front of the file name)
But this is not honored by Sourcetree, at least in Git Embedded mode, and the configuration is in:
%USERPROFILE%\AppData\Local\Atlassian\SourceTree\git_local\mingw32\etc\gitconfig
(no dot in front of the file name)
(I needed to update both files to modify my global Git settings for Git command and Sourcetree.)
Another fun part. The Git hooks configuration was working from the AppData\Local\...
location, but after more research via Process Monitor, I noticed somehow Sourcetree is also loading global from company mapped drive for my user.
This makes very little sense as very few applications lookup this location, but somehow Sourcetree does, so if you can't make it to work per location settings at Sourcetree, run Process Monitor and create a rule to log only path containing gitconfig, and you can find where really your global configuration is in case of a network-mapped user directory.
And this may not be even fault of Sourcetree, as I see now as I write this that git.exe is loading that, but this happens only for git.exe executed by Sourcetree, while a direct command line Git uses %USERPROFILE%\.gitconfig
Finally I took all the results from Process Monitor, fed it into SQL Server and ran a query to get distinct results (no particular execution order just sorted by path):
I don't know how those configurations relate to each-other, but I know some override another some settings works from one location some from another.
And the above list is invoked by Sourcetree, again direct a command line with Git seems to work fine with %USERPROFILE%\.gitconfig
, and that is not on this list, but it would look like this (on Windows 7 ) C:\Users\pawel.cioch\.gitconfig