Creating a clean gh-pages branch This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO] cd /path/to/repo-name git symbolic-ref HEAD refs/heads/gh-pages rm .git/index git clean -fdx echo "My GitHub Page" > index.html