So I wanted to setup a Github style scenario for my latest Android app's website. I love using Jekyll with Github Pages, and wanted to build a site using Jekyll to host myself. I first thought about creating a new repository for the website, but then I was all like "wait, how does Github do it?".

A quick googling sent me to [this]http://bitflop.com/tutorials/how-to-create-a-new-and-empty-branch-in-git.html) great guide. So basically all you need to do is checkout the repository:

git clone http://path/to/your/repo

Checkout an orphan branch:

git checkout --orphan website

Remove all the files:

git rm -rf .

Note: I felt a little boilky about deleting all the flies, but then I remembered that I'm using Android Studio and the files are also checked out into a whole other directory.

Finally, copy/create new files in the branch and commit them:

git add .
git commit -am "Inital Import"

You can switch back to the master branch with:

git checkout master

And see that all the original files are back like a champ, then just:

git checkout webite

And boom back to developing a killer Jekyll site. Fun Times!!

Party On!