Which git.exe should I reference?

后端 未结 2 1886
离开以前
离开以前 2021-02-20 00:18

Git for Windows has installed four git.exe files.

They seem slightly different (comparing bytes).

Which should I use for other applicatio

相关标签:
2条回答
  • 2021-02-20 01:01

    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}" ...

    0 讨论(0)
  • 2021-02-20 01:07

    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.

    0 讨论(0)
提交回复
热议问题