Created
September 29, 2020 19:19
-
-
Save matteodelucchi/f9dffd7967687d51cb5f577228fc6bd1 to your computer and use it in GitHub Desktop.
local-empty-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
# Make a new branch with no parents and disconnected from all other branches | |
git checkout --orphan gh-pages | |
# Remove all files from the working tree | |
git rm -rf . | |
# Make an empty commit | |
git commit --allow-empty -m 'Initial gh-pages commit' | |
# Pushing to remote will create gh-pages branch on the remote repo | |
git push origin gh-pages | |
git checkout master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment