Since few days ago, every time I start Git GUI in a repository, it displays this horrifying error message and quits after I click OK:
prepare-commit-msg hook fai
Simply make a search for all msys-1.0.dll on your C:\ drive, and make the one used by Git comes first.
In my case, I simply changed the order of:
C:\prgs\Gow\Gow-0.7.0\bin\msys-1.0.dll
C:\prgs\git\PortableGit-1.8.5.2-preview20131230\bin\msys-1.0.dll
By making the Git path C:\prgs\git\PortableGit-1.8.5.2-preview20131230\bin\ come first in my %PATH%, the error message disappeared!
No need to reboot or to even change the DOS session.
Once the %PATH% is updated in that DOS session, the git commands just work.
Sidenote, regarding gdb:
With Git 2.25.2 (March 2020) adds a better gdb debugging experience.
See commit 08809c0 (13 Feb 2020) by Johannes Schindelin (dscho).
(Merged by Junio C Hamano -- gitster -- in commit e154451, 17 Feb 2020)
mingw: add a helper function to attach GDB to the current process
Signed-off-by: Johannes Schindelin
When debugging Git, the criss-cross spawning of processes can make things quite a bit difficult, especially when a Unix shell script is thrown in the mix that calls a
git.exethat then segfaults.To help debugging such things, we introduce the
open_in_gdb()function which can be called at a code location where the segfault happens (or as close as one can get); This will open a new MinTTY window with a GDB that already attached to the current process.Inspired by Derrick Stolee.
Then new function open_in_gdb() has the comment:
/*
* For debugging: if a problem occurs, say, in a Git process that is spawned
* from another Git process which in turn is spawned from yet another Git
* process, it can be quite daunting to figure out what is going on.
*
* Call this function to open a new MinTTY (this assumes you are in Git for
* Windows' SDK) with a GDB that attaches to the current process right away.
*/