Skip to content

Instantly share code, notes, and snippets.

@nise-nabe
Created June 29, 2013 05:47
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 nise-nabe/5890000 to your computer and use it in GitHub Desktop.
Save nise-nabe/5890000 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ "$2" = "" ] ; then
branch_name=`git branch | grep "*"`
mv $1 $1.tmp
echo "(refs #`echo "$branch_name" | sed -e 's/^* t-\(.*\)/\1/g' | cut -d'-' -f1 `)" > $1
cat $1.tmp >> $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment