Missing .gitconfig files after installing Git on new Windows 10 box (also, SourceTree not launching BeyondCompare)

Issue

I’m setting up my new Windows 10 box, and I’m not sure Git installed correctly. Here are the steps I’ve taken so far:

First, I downloaded and installed Git (v2.26.2) from here: https://git-scm.com/download/win

I use SourceTree (v3.3.8) with BeyondCompare4 (v4.3.4) as the external diff tool. The problem I ran into is that SourceTree won’t launch BeyondCompare. Everything should be configured correctly in SourceTree’s options. After some investigation, I found this post: https://community.atlassian.com/t5/Sourcetree-questions/external-diff-stopped-working/qaq-p/970290

To summarize, it suggests manually editing the .gitconfig files here: C:\Users\.gitconfig and here: C:\Program Files\Git\mingw64\etc\gitconfig

The problem is that the .gitconfig files do not exist at either location!

After a bit more searching, I found a suggestion to run, “git clone https://github.com/git/git“. I did so at the root C:. But it just created a new C:\git folder with a bunch of stuff in it; but no .gitconfig file here either.

SourceTree is working fine otherwise though. I can push and pull code just fine.

Everything worked just fine on my old Windows 7 box. I had zero issues. Admittedly, I have no idea how I installed everything on that machine originally…

Suggestions?

Thanks!

Solution

The problem ended up being that Git’s home directory defaulted to H:. My computer doesn’t have an H:. I ended up adding a system variable to Windows to set my home directory to my default user folder. Then everything just worked.

Answered By – adamjhilton

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published