Created
January 21, 2016 14:20
-
-
Save ChoiZ/deea7a23362de38f407d to your computer and use it in GitHub Desktop.
git hooks commit-msg with prepend branch-name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# .git/hooks/commit-msg | |
# | |
# Last modified 2016-01-21 | |
# François LASSERRE <francois@monechelle.fr> | |
current_branch=`git rev-parse --abbrev-ref HEAD` | |
sed -i bak -e "1s/^/${current_branch} /" $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment