Skip to content

Instantly share code, notes, and snippets.

@PeterLehmann
Last active January 4, 2016 16:09
Show Gist options
  • Save PeterLehmann/8645669 to your computer and use it in GitHub Desktop.
Save PeterLehmann/8645669 to your computer and use it in GitHub Desktop.
#!/bin/sh
ORIG_MSG_FILE="$1"
TEMP="/tmp/git-$RANDOM"
ISSUENUMBER=`git branch | grep '^\*' | cut -f 2 -d ' '| grep -i -E 'LBF' | cut -f 2 -d '/'`
if [ -n "$ISSUENUMBER" ]; then
(echo "issue: $ISSUENUMBER ";cat $ORIG_MSG_FILE) > "$TEMP"
cat "$TEMP" > $ORIG_MSG_FILE
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment