Last active
November 4, 2016 21:25
-
-
Save lsaffie/65eb9b315b2c66ae1ab797127aacddff to your computer and use it in GitHub Desktop.
git hook: appends branch name on every commit
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 | |
# Place this in <project_name>/.git/hooks/prepare-commit-msg | |
git branch | sed -n '/\* /s///p' >> $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You just opened up a whole new world for me!