Created
September 3, 2011 21:44
-
-
Save mybuddymichael/1191833 to your computer and use it in GitHub Desktop.
Keep GitHub pages synced with 'master'
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
#!/usr/bin/env sh | |
if [ $(git symbolic-ref HEAD 2> /dev/null) = "refs/heads/master" ] | |
then | |
git checkout gh-pages | |
git merge master | |
git checkout master | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a CoffeeScript game project that uses a simple
index.html
file to run the app. I use GitHub pages as a demo for the app, therefore I always want mygh-pages
branch in-sync withmaster
. This is mypost-commit
hook to make it happen.