Skip to content

Instantly share code, notes, and snippets.

@nasirkhan
Created March 28, 2013 17:03
Show Gist options
  • Save nasirkhan/5264996 to your computer and use it in GitHub Desktop.
Save nasirkhan/5264996 to your computer and use it in GitHub Desktop.
This is a post-commit hook for Github master and the Github Project Pages. You have to enable this hook at the github project root .git directory. The file path should be the following ".git/hooks/post-commit". If you are using Linux make sure the "post-commit" file has the execute permission. This hook will automatically sync the github master …
#!/bin/sh
# Mirror master in gh-pages
git checkout gh-pages
git merge master
git checkout master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment