I'm using SourceTree and Git 2.21.0 for Windows and was having a lot of trouble with configuration. SourceTree is set to use the system git install and shows the proper 2.21.0 version number. I ran these commands in a non-repository directory in command prompt and got surprising results:
- `git config --list` outputs mostly my `%ProgramData%\Git\Config` file's contents.
- `git config --global --list` output conflicting configuration data
- `git config --global --edit` opened `C:\Users\Me\.gitconfig`. I thought this was just the SourceTree global, I expected it to open the one in ProgramData.
- `git config --system --edit` opened `C:\Program Files\Git\mingw64\etc\gitconfig` as expected
- From the `%ProgramData%\Git\` directory, `git config --edit` produced an error.
> fatal: not in a git directory
How is `git config` able to list my `%ProgramData%\Git\Config` contents but not edit that file and what is it if it isn't System, Global, or Local config? Why is `git config --global` using the SourceTree file, is that just the default path to the Global config for git on Windows?