Last active
December 1, 2022 16:26
-
-
Save skratchdot/1ef433c666066389201a to your computer and use it in GitHub Desktop.
Initialize gh-pages branch
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
# 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 [email protected]: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
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