Hi,
On Fri, 24 Apr 2020, Bryan Turner wrote:
> On Fri, Apr 24, 2020 at 2:48 PM <
adamj...@gmail.com> wrote:
> >
> > I'm setting up my new Windows 10 box and I'm having issues with
> > opening Beyond Compare from Source Tree. I think this is stemming from
> > an improper Git installation. Maybe...? So, here's what I did:
> >
> > I downloaded the Windows Git installer from here:
> >
https://git-scm.com/download/win
> >
> > This created the Git directory structure here: C:\Program Files\Git
> >
> > Looks good so far. But while investigating why Source Tree wasn't
> > behaving well with Beyond Compare, I ran across this post:
> >
https://community.atlassian.com/t5/Sourcetree-questions/external-diff-stopped-working/qaq-p/970290
> >
> > To summarize, it suggested manually editing the .gitconfig files here:
> > C:\Users\<username>\.gitconfig
>
> If you start "Git Bash" and run "git config --global --edit" it should
> help you create this file. It will open the file for editing in whatever
> editor you selected to use when you installed Git. The file will start
> out empty, but you can add whatever lines you'd like and when you save
> they'll be written to C:\Users\<username>\.gitconfig.
>
> > C:\Program Files\Git\mingw64\etc\gitconfig
>
> This file exists in my own Git installation. Perhaps your Git install
> did not complete?
That file used to be the correct location, but a change some time last
year moved the system config to `C:\Program Files\Git\etc\gitconfig`.
Originally, when moving Git for Windows to v2.x in 2015, that change came
with the move of `git.exe` and friends into `/mingw64/`, and I was quite
surprised that other projects seemed to expect the location of either to
be anything else than an internal implementation detail.
We introduced the location `C:\ProgramData\Git\config` to make up for that
move, but there were many, many problems with it, not the least of which
that nobody seemed to respect that location (or even know about it).
In any case, whenever you want to suggest to users to look at the
user-wide or system-wide config, you should use `git config --edit
--global` or `git config --edit --system`. Never, ever, the absolute path.
People might install things into different locations, and files _can_
move, so that's all so confusing and easily prevented.
Ciao,
Johannes