Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Created June 28, 2022 11:51
Show Gist options
  • Save remlapmot/d192bd6d8d4e787e1b2eb75db332762a to your computer and use it in GitHub Desktop.
Save remlapmot/d192bd6d8d4e787e1b2eb75db332762a to your computer and use it in GitHub Desktop.
Create empty gh-pages branch and push to GitHub
#!/bin/bash
# From https://blog.ediri.io/how-to-create-a-github-gh-pages-branch-in-an-existing-repository
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Empty gh-pages branch"
git push origin gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment