Last active
August 29, 2015 14:07
-
-
Save richardcornish/dd043891f70c9d47f75a to your computer and use it in GitHub Desktop.
Creates a gh-pages branch based on a gh-pages directory, and serves its contents as a <username>.github.io website
This file contains hidden or 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
# First time | |
mkdir gh-pages | |
touch gh-pages/index.html | |
git add gh-pages | |
git commit -m "First commit of GitHub Pages branch" | |
git push origin master | |
# Subsequent times | |
# Edit, save, commit, push files inside gh-pages directory | |
git subtree push --prefix gh-pages origin gh-pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment