我应该参考哪个git.exe? [英] Which git.exe should I reference?

查看:81
本文介绍了我应该参考哪个git.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于Windows的Git已安装了四个 git.exe 文件.

Git for Windows has installed four git.exe files.

它们似乎略有不同(比较字节).

They seem slightly different (comparing bytes).

我应该将哪些应用程序用于需要引用git.exe的其他应用程序?

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

推荐答案

每个版本都有不同的用途.

The different version are each one for a different purpose.

  • \ Program Files \ Git \ bin \ git.exe
    这是实际的git二进制文件,如果您通过任何脚本等运行它,则会将其添加到您的路径中.

  • \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.

此条目可在Windows的git源脚本中找到:
> https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/portable/release.sh

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
这是在您添加安装并选择将git添加到您的 cmd (Windows路径)

\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)

可以在源代码中找到此条目:<文件Id ="GitExe" Source ="cmd \\ git.exe"/> > https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/msi/release.sh

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
这是git-bash cygwin模拟器使用的git-bash版本

\Program Files\Git\mingw64\bin\git.exe
This is the git-bash version which is used by the git-bash cygwin emulator

它在wxs(安装程序文件)中定义
https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/msi/GitProduct.wxs

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
    该对象也适用于仿真器,并在此处定义:
    https://github.com/git-for-windows/build-extra/blob/69c134c3c2c46bce1083d5bd4596d26543ca5f0f/git-extra/git-prompt.sh

    <代码>如果测试-z"$ WINELOADERNOEXEC"然后GIT_EXEC_PATH ="$(git --exec-path 2>/dev/null)"COMPLETION_PATH ="$ {GIT_EXEC_PATH%/libexec/git-core}"...

    这篇关于我应该参考哪个git.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆