Skip to content

Instantly share code, notes, and snippets.

@stuartf
Created July 18, 2012 20:10
Show Gist options
  • Save stuartf/3138557 to your computer and use it in GitHub Desktop.
Save stuartf/3138557 to your computer and use it in GitHub Desktop.
Branch name in commit msg
BRANCHNAME=$(basename $(git rev-parse --symbolic-full-name HEAD))
if grep -qi '^SAKIII' << EOF
$BRANCHNAME
EOF
then
sed -i "1i\
$BRANCHNAME" $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment