Silly (Personal) Issue Pushing Jekyll to Github Pages

When I was rebuilding this site to use Jekyll I ran into a really stupid issue when it came to deploying to Github Pages. I had the impression that the master branch (this site is an organization page, not a regular Github page, so the site is deployed to the master branch instead of the gh-pages branch) should only get the code that is generated in the _site directory and that the source should be put on some other development branch.

I spent a good deal of time trying to figure out how to push only the contents of the _site directory to master. I didn’t understand how a popular tool like Jekyll would have nothing about how to do this.

It turns out the issue was my own poor reading of the docs, rather than anything to do with Jekyll or Github. On the Github help page for working with Jekyll it reads:

Every GitHub Page is run through Jekyll when you push content to a specially named branch within your repository...Simply start committing Jekyll formatted files, and you'll be using Jekyll in no time.

Using Jekyll with Pages

All I ever needed to do was push my source files to master and Github would automatically run them through Jekyll. It just works. I completely misunderstood this and wasted a lot of time on hacky and confusing workarounds like subtree merging. I might be the only person who has had this problem, but if not I hope this is helpful.