To be able to run the test scripts for my cross-platform application also on Windows, I installed MSYS2 and used pacman to install any packages my test scripts rely on.
Since MSYS2 provides a port of git (msys/git), I think there is no need to install Git for Windows as well. But what are the differences between the git version provided in the MSYS2 repository and the one provided by Git for Windows?
I noticed these differences so far:
msys/git will fail when running
pip freeze
on a virtualenv where a Python package from a git clone is installed in develop mode:FileNotFoundError: [WinError 3] The system cannot find the path specified: '/c/users/user/documents/project/.git\\..'
git-for-windows/mingw-w64-x86_64-git doesn't fail, so there are at least some differences with respect to path handling.
Git for Windows's gitk and git gui work out of the box. There's no need to set the
GIT_GUI_LIB_DIR
environment variable as described here.
It seems git from the Git for Windows repository offers the best experience at this point.
P.S. You can install Git for Windows's git in MSYS2 by adding the following to /etc/pacman.conf
, above the [mingw32]
, [mingw64]
and [msys]
entries. But it might be a better idea to install the Git for Windows SDK instead, which is basically a special edition of MSYS2 including Git for Windows. Otherwise, the procedure below (and more) is also described here.
[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
After this (and perhaps a pacman -Sy
), you can install the Git for Windows's git:
pacman -S mingw-w64-x86_64-git
I suppose there's no reason not to install Git for Windows's git in MSYS2?
EDIT The Git for Windows (un)installer left behind C:\ProgramData\Git\config
. This points git at the wrong location for the SSL certificates. You can remove C:\ProgramData\Git\config
to fix this.
pacman.conf
and runpacman -Sy
i'm getting errorsignature from "Johannes Schindelin <[email protected]>" is unknown trust
,invalid or corrupted database of PGP signatures
. – ArabelSigLevel = Optional TrustAll
in the[git-for-windows]
section in/etc/pacman.conf
. Though from a security standpoint, that's probably a big no-no. – Quachtime
d git clone of a large repository in Git for Windows versus Git in Msys2 the latter was actually faster. Can anybody confirm this? – GirdleC:\Users\user
instead of the standardMsysInstallationPath\home\user
, and many other things that may be undesired for some people. – ArabelC:\Users\user
for HOME path too. Just set the envMSYS2_PATH_TYPE=inherit
– Twitty