Github: From Zero to Hero

Are you looking to get some projects up on Github? There are a few different approaches you can take. Here is mine.

First, you need some projects. Front end projects work best for Github project pages. If you have ideas that involve server-side, you will need to host that aspect of your project somewhere else and you would never want to host any api keys or security-sensitive content on a public Github page (obviously).

For my projects, I like to have my project demo page and the master branch of the code be the same. So, start with your master branch and build it out. There are lots of tutorials on Git and Github, so find one that works for you if you want help getting started.

When your demo is ready, the next step is to create a Github Project Page. This can be accomplished simply by creating a new gh-pages branch that is identical to your master branch.

git checkout -b gh-pages
git push origin gh-pages

As you make changes to the project, keep your gh-pages and master branches in sync. The easiest way to do this is with git rebase.

git commit -m 'my master branch update'
git push origin master
git checkout gh-pages
git rebase master
git push origin gh-pages

For more information on this pattern, read these posts by Lea Verou and Oli Studholme. One thing you could try is to make a project and use it as a git/github playground for experimentation.

So, you have your first project page. Now just rinse and repeat. Once you have a few project pages, you should make them a fancy landing page home for them. For example, I have johnpolacek.github.io for my projects. To create one of these, simply create a new repo that follows the naming scheme yourgithubname.github.io and build out a nice web page. When you are all set, commit and push to master and you are done.

If you’d like to have your project pages be on a custom non-github domain, Github has a nice help page devoted to that. (Github makes everything so easy – Thanks Github!)

One benefit to having your content on a github domain is superior search rankings. Because of its massive popularity, Github ranks high for authority. This means that if you keep your code projects on Github, and insert links to your other content (blog, twitter, etc.) you will get some nice Google juice out of it.

Not all of your projects will get attention, and that’s ok. Remember, everyone has to start somewhere. Just keep pushing code and improving your skills. Good things are bound to happen. Most importantly: Have fun!

Comments are closed.