Skip to content

Instantly share code, notes, and snippets.

@icoloma
Last active March 13, 2017 19:41
Show Gist options
  • Save icoloma/6532fed2451ad6aad6a675f0e576e05a to your computer and use it in GitHub Desktop.
Save icoloma/6532fed2451ad6aad6a675f0e576e05a to your computer and use it in GitHub Desktop.
Create a github-pages branch from scratch on an existing repo
git clone -b gh-pages <remote_repo> <folder-name>
# Full instructions at
# https://help.github.com/articles/creating-project-pages-using-the-command-line/
# Go to the full instructions for other examples like pushing gh-pages to master or to a docs folder in master
cd my-project
git checkout --orphan master
git rm -rf .
# <add content here>
git commit -a -m "First pages commit"
git push -u origin gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment