Getting git under MinGW

2012/03/05

Categories: GeekStuff

So, Git for Windows offers a working git under Windows – in a strange variant form of the MinGW environment that lacks all the usual creature comforts.

It appears, however, that it is compatible enough.

Imagine that you have installed both MinGW and msysgit on a single Windows machine, and started a MinGW shell. First off, do not try to cd into the bin directory of msysgit; the default $PATH has . in it, and stuff goes wrong.

But!

EDIT: The first path may have changed, as of October 2012 it appears to be /c/msysgit or some such.

$ cd /c/Pro*86*/git
$ cp bin/git* /mingw/bin
$ cp -r libexec/git* /mingw/libexec
$ cp -r share/git* /mingw//share

Poof! The git shell commands work now. I haven’t found any obvious problems in casual use, anyway. (Disclaimer: Since this is already done I haven’t retested the exact commands, but the idea is sound.)