Skip to content

Instantly share code, notes, and snippets.

@saxsir
Created November 10, 2015 14:33
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 saxsir/5cd33801fc2a77a1b1f8 to your computer and use it in GitHub Desktop.
Save saxsir/5cd33801fc2a77a1b1f8 to your computer and use it in GitHub Desktop.
git commitする時にissue番号を自動で入力するgit hooks
#!/bin/sh
#
if [ "$2" == "" ] ; then
mv $1 $1.tmp
echo "(issue #`git branch | grep "*" | awk '{print $2}' | sed -e "s/[^0-9]//g"`)" > $1
cat $1.tmp >> $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment