I have a commit template set up for git, and I would like to include the name of the current branch in it. I usually set up the branch to be the bug id, and it would help me
A solution using git alias but no template:
$ git config --global alias.com '!sh -c "bug=`git symbolic-ref HEAD|sed s#refs/heads/##`; git commit -em \"BUG: \${bug}\""' $ git com