Created
October 30, 2014 22:22
-
-
Save tdowling/38a1c5c600ca78e7f55e to your computer and use it in GitHub Desktop.
Commit message to add branch name and newlines to pre-commit hook on osx
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 | |
BRANCH_NAME=$(git branch | grep '^*' | sed 's/^* //') | |
sed -i "" "1s/^/$BRANCH_NAME \\"$'\n'"\\"$'\n'"https:\/\/jira.company.com\/browse\/$BRANCH_NAME/" $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment