Created
February 23, 2009 05:10
-
-
Save glimberg/68811 to your computer and use it in GitHub Desktop.
Post Commit hook to automatically push to origin/branch
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/sh | |
# | |
# A hook script that is called after a successful | |
# commit is made. | |
# | |
# Place this file in .git/hooks and chmod +x | |
BRANCH=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
git push origin $BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rather, try
HTH?