Correct git.exe path for TortoiseGit under Git for windows 2.4

54.5k views Asked by At

I have installed the Git for windows 2.4.1 release candidate (64bit)

It seems that after installation the following has been added to the system path

C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin

But with that setting it seems that TortoiseGit stops working. When I try to do a git operation in TortoiseGit, it cannot find my git username anymore.

enter image description here

I have version 1.8.14.0 of TortoiseGit, which is the latest.

The TortoiseGit Git.exe Path setting currently points to C:\Program Files\Git\cmd.

In the TortoiseGit documentation it states

There is a known issue in msysGit/Git for Windows: Git for Windows provides two git.exe-files (one in a folder named bin and one in a folder named cmd). Make sure Git.exe Path points to the bin-folder within the Git for Windows installation folder.

In Git 2.4 there is a folder C:\Program Files\Git\usr\bin, but that no longer contains the git.exe binary.

The git.exe binary is found in both C:\Program Files\Git\cmd and C:\Program Files\Git\mingw64\bin but neither of those settings work for TortoiseGit.

4

There are 4 answers

0
Jeremy Fortune On BEST ANSWER

Check to make sure that your %HOME% variable in Windows is set so that TortoiseGit can find your .gitconfig file.

0
MrTux On

TortoiseGit 1.8.14.1 (preview release) has full support for Git for Windows 2.x (no need for workarounds with adding unneeded folders to %PATH%). Before this version, TortoiseGit cannot find the git system config of Git for Windows 2.x.

The warning you are getting means that you haven't set up the user.name and user.email git config settings. This can be done for a project or also globally (in %HOME%\.gitconfig: TortoiseGit here uses the %HOME% environment variable - if it is not set TortoiseGit uses your Windows home directory automatically).

1
user6664090 On

All of these answers are wrong. The Git.exe Path in setting is set incorrect.

Steps to fix:

  1. Right click on git respostory
  2. Select TottoiseGit | Settings
  3. You will get the warning dialog
  4. Dismiss it
  5. You will get another dialog, select ignore
  6. Settings will launch
  7. Select: General (at the top of the tree)
  8. In the edit field for Git.exe path (half way down) enter the Git.exe path (in my case C:\ProgramFiles\Git\bin)

That's it!

0
Vivek Nuna On

I was also getting the same error. I installed git from here. And then tried to install tortoisegit, it worked.