Git for Windows has installed four git.exe
files.
They seem slightly different (comparing bytes).
Which should I use for other applications that want a reference to git.exe?
\Program Files\Git\bin\git.exe
\Program Files\Git\cmd\git.exe
\Program Files\Git\mingw64\bin\git.exe
\Program Files\Git\mingw64\libexec\git-core\git.exe
1 Answer. If on windows, the default path is C:\Program Files (x86)\Git. The name of the executable is not git.exe for all systems.
The default path on windows is C:\Program Files (x86)\Git . The name of the executable is not git.exe on all systems.
Git is a DevOps tool for source code management—an open-source version control system (VCS) used to handle small to very large projects efficiently.
On the next step, you should choose where to install the program. The default path is “C:\Program Files\Git“. If you want the software installed in a different location click Browse and specify a different folder.
The different version are each one for a different purpose.
\Program Files\Git\bin\git.exe
This is the actual git binary which is added to your path if you run it form any script etc.
This entry found here in the git source script for windows:
https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/portable/release.sh
\Program Files\Git\cmd\git.exe
This is the git which is run when you add installed and choose to add git to your cmd
(windows path)
This entry can be found here in the source : <File Id="GitExe" Source="cmd\\git.exe" />
https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/msi/release.sh
\Program Files\Git\mingw64\bin\git.exe
This is the git-bash version which is used by the git-bash cygwin emulator
It defined here in the wxs (installer file)
https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/msi/GitProduct.wxs
<?if $(var.SixtyFourBit)=64 ?>
<Directory Id='MingwFolder' Name='mingw64' />
<?else?>
\Program Files\Git\mingw64\libexec\git-core\git.exe
Thisone is also for the emulator and is being defined here:
https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/git-extra/git-prompt.sh
if test -z "$WINELOADERNOEXEC"
then
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
...
When you are using from your windows command prompt you should be referring to the, \Program Files\Git\bin\git.exe
The ones under mingw64
are used with the Git bash interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With