Created
May 4, 2013 16:57
-
-
Save willread/5518072 to your computer and use it in GitHub Desktop.
Create a clean gh-pages branch.
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
# delete any existing branch | |
git branch -D gh-pages | |
git push origin --delete gh-pages | |
# create new branch and switch to it | |
git checkout -b gh-pages | |
# remove all but git files | |
rm -rf $(ls -a | egrep -v '^(\.|\.\.|\.git)$') | |
# create an empty index.html and commit it | |
touch index.html | |
git add -A | |
git commit -m "Created clean gh-pages branch" | |
# push it, push it real good | |
git push -u origin gh-pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment