Skip to content

Instantly share code, notes, and snippets.

@kishiamy
Created March 10, 2014 09:27
Show Gist options
  • Save kishiamy/9461959 to your computer and use it in GitHub Desktop.
Save kishiamy/9461959 to your computer and use it in GitHub Desktop.
Set trello_id in commit by default
#!/bin/sh
TRELLO_ID=`git rev-parse --abbrev-ref HEAD | egrep -o '[a-zA-Z0-9]{8}$'`
if [ -n "$TRELLO_ID" ]; then
sed -i -e "1s/^\(.*\)/[$TRELLO_ID] \1/" $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment