Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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