Last active
July 19, 2019 11:55
-
-
Save pawndev/aef16ebe17c8791716dddaee10c7148e to your computer and use it in GitHub Desktop.
pre-commit-msg
This file contains hidden or 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/sh | |
| BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *') | |
| if [ -n "$BRANCH_NAME" ] && [ "$BRANCH_NAME" != "master" ] && [ "$BRANCH_NAME" != "(nobranch)" ]; then | |
| echo "$BRANCH_NAME | $(cat $1)" > $1 | |
| fi |
pawndev
commented
Dec 10, 2018
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment