SebastianRV
SebastianRV

Reputation: 55

Git Gui Windows does not call pre-hook

I'm using Git git version 2.45.2.windows.1 and I implemented a prepare-commit-msg hook locally to my repository. Here is an MWE:

#!/bin/sh
# prepare-commit-msg hook
echo $0
filename=$(date | sed 's/[^0-9]//g') # date
touch $filename.txt # create a new file
exit 0

When committing from the console with git commit -m "My message", the hook gets called and I see the name of the hook.

.git/hooks/prepare-commit-msg

But when I do a commit using the Git Gui, the hook does not get called.

Does anyone have an idea of what is happening?

enter image description here

Upvotes: 0

Views: 52

Answers (0)

Related Questions