Skip to content

Instantly share code, notes, and snippets.

@achikin
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achikin/d6a32ed42d5735d7f24d to your computer and use it in GitHub Desktop.
Save achikin/d6a32ed42d5735d7f24d to your computer and use it in GitHub Desktop.
.git/hooks/prepare-commit-msg
#put this into prepare-commit-msg to insert branch name into commit msg
echo $(git symbolic-ref HEAD | awk -F/ '{print $NF}'): > $1.tmp
cat $1 >> $1.tmp
mv $1.tmp $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment