I want to prepare a commit message based on the name of the current branch. For testing I created .git/hooks/prepare-commit-msg looking like
#!/bin/sh
echo 1: $1
echo 2: $2
echo 3: $3
mv $1 $1.org
echo foo > $1.tmp
cat $1.tmp $1.org > $1
when I do "git commit" from cmd I get a commit message containing "foo" (and then some stuff git added).
From SourceTree I get an empty commit message in the commit message text box.
I had expected SourceTree to honour the hook.