Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Initialize gh-pages branch
# create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .
git add
git commit -m 'initial gh-pages commit'
git push origin gh-pages
# add gh-pages as submodule
git checkout master
git submodule add -b gh-pages _site
git commit -m "added gh-pages as submodule"
git push origin master
git submodule init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment