What are the differences between msys/git and git-for-windows/mingw-w64-x86_64-git?
为了能够在Windows上也为我的跨平台应用程序运行测试脚本,我安装了MSYS2,并使用pacman安装了测试脚本所依赖的任何软件包。
由于MSYS2提供了git(msys / git)端口,因此我认为也无需为Windows安装Git。但是,MSYS2存储库中提供的git版本与Git for Windows提供的git版本有什么区别?
到目前为止,我注意到了这些差异:
在virtualenv上运行
1 | FileNotFoundError: [WinError 3] The system cannot find the path specified: '/c/users/user/documents/project/.git\\..' |
git-for-windows / mingw-w64-x86_64-git不会失败,因此在路径处理方面至少存在一些差异。
Windows的gitk和git gui的Git开箱即用。无需按此处所述设置
到目前为止,Git for Windows存储库中的git似乎提供了最佳体验。
附言您可以通过在
1 2 3 4 5 | [git-for-windows] Server = https://dl.bintray.com/$repo/pacman/$arch [git-for-windows-mingw32] Server = https://dl.bintray.com/git-for-windows/pacman/i686 |
之后(可能是
1 | pacman -S mingw-w64-x86_64-git |
我想没有理由不在MSYS2中为Windows的git安装Git吗?
编辑
msys / git与MSYS2提供的动态库链接,以类似于cygwin的方式(Mcy2是从cygwin派生的)的方式提供POSIX到Windows的兼容性(POSIX仿真),因此它需要存在MSYS2环境。 跑。
另一方面,git-for-windows / mingw-w64-x86_64-git是使用MinGW编译器进行编译的,该编译器在编译时会将其转换为对本机Windows的调用,与模拟方法相比,二进制文件的速度要快得多, 并且只需要运行本机Windows库即可。
从MSYS2和MinGW之间的区别:
The POSIX emulation layer of MSYS2 binaries is convenient, but comes at a cost: Typically, MSYS2 programs are noticably slower than their MinGW counterparts (if there are such counterparts). As a consequence, the Git for Windows project tries to provide as many components as possible as MinGW binaries.
另请参阅:MSYS2与Cygwin有何不同?