Spinning Up a New GitHub Pages Site.
Pages might just be one of my favorite things about GitHub. Though I often use them for lists of links to go along with my presentations, they are capable of much more complex static sites.
Here is a quick reminder of how to set up a new GitHub Pages site:
- Create a new repo on GitHub.
- Don't create any new files yet, even licenses or readmes. If you have already created files, then stash them.
- Clone that repo locally and check out a new
git checkout -b gh-pages).
- Pop any files you've stashed. Add any other files you want in your repo.
- Commit the changes, and then push the
gh-pagesbranch up to Github.
You're done! You can now view your new page at
If you have somehow ended up with a master branch with commits, you can remove it thusly:
- On the GitHub site, make the gh-pages branch the default.
- Delete the master branch both on the GitHub site and locally.
Tags: git speaking tooling web-development