1/22/13

no master

Bwahaha! Thanks to this post, I can host JavaScript projects on github a little more cleanly, by removing the master!

Here is my first attempt using this style, which can be viewed here.


Ahem, let me start again to be more clear:

Problem: I put a JavaScript thing on github like this, but to view it, I need to wrap it like this — note the http://htmlpreview.github.com/? at the beginning of the url. I could put the code in a gh-pages branch, but then I feel like people will be confused when they go to the repository on github and see nothing in it, because there is nothing in the master branch, which is what they see by default.

Solution: First, it turns out we can make the gh-pages branch the default. This setting is in the Settings tab, right beneath the repository name changer. Second, it turns out we can remove the master branch entirely from github, so that nobody accidentally checks out that branch, by doing this: git push origin :master. I then delete my local repo and re-clone it.

Update: It is possible to create a gh-pages branch, set it to the default, and delete the master branch, all from the github website :)

No comments:

Post a Comment