Skip to content

Instantly share code, notes, and snippets.

@9bow
Forked from skratchdot/gh-pages.sh
Created August 14, 2018 06:38
Show Gist options
  • Save 9bow/b4b4c87ee5cfa32a6986dd11c508ba34 to your computer and use it in GitHub Desktop.
Save 9bow/b4b4c87ee5cfa32a6986dd11c508ba34 to your computer and use it in GitHub Desktop.
Initialize gh-pages branch
# create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .
touch README.md
git add README.md
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 git@github.com:skratchdot/MYPROJECT.git _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