Skip to content

Instantly share code, notes, and snippets.

@cloudcap10
Last active April 19, 2020 13:00
Show Gist options
  • Save cloudcap10/7fdbfce5211b4716bed91ea849f3a0c5 to your computer and use it in GitHub Desktop.
Save cloudcap10/7fdbfce5211b4716bed91ea849f3a0c5 to your computer and use it in GitHub Desktop.
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initializing gh-pages branch"
git push upstream gh-pages
git checkout master
git worktree add -B gh-pages docs origin/gh-pages
cd public && git add --all && git commit -m "Publishing to gh-pages" && cd ..
gh-pages branch and disable Jekyll
git checkout --orphan gh-pages
touch .nojekyll
git add .nojekyll
git commit -m "Disable Jekyll"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment