I have a repo on GitHub. Recently I have discovered GitHub's pages and I want to use them.
I would like to create this new branch and then, when I need to, either commit on master
branch or on gh-pages
branch.
How can I do this? Do I have to create another folder inside my repo?
More recent versions of git have an alternative to the git symbolic-ref
method that Chandru explained. This avoids having to use the lower level commands.
git checkout --orphan gh-pages
git rm -rf .