Skip to content

Instantly share code, notes, and snippets.

@jproyo
Created May 28, 2013 19:59
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 jproyo/5665633 to your computer and use it in GitHub Desktop.
Save jproyo/5665633 to your computer and use it in GitHub Desktop.
Prepare Commit Message with Prepend Branch named for Git
#!/bin/sh
NAME=$(git branch | grep '*' | sed 's/* //')
echo "[#$NAME"': '$(cat "$1")"]" > "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment