Finally on GitHub, you should be too.

I’ve finally started migrating/publishing code on GitHub. Coder cowboy git code will be here: https://github.com/codercowboy

For starters, I’m migrating old World’s Worst Software code there, so I can retire WWS.

I highly recommend publishing your own open source code and projects on GitHub or SourceForge, or on a blog or website of your own.

You don’t need to be a coder to put something great out there (or even on GitHub), sharing your creative efforts with the world is almost always a good idea. Designers can share photoshop templates, writers can store and show their book writing/editing process, source control and sharing your efforts is truly for anyone.

When you share your efforts, you are doing the following: you’re saving other people time; you’re inspiring other people to share their own work; you’re building a portfolio of good deeds to cite on your resume; and you’re making the world a better place.

Git is a source control management (SCM) system, like Subversion (svn), ClearCase, Mercurial, Source Safe, and a dozen other such systems.

A source control system is a system that lets you store old and new versions of a file, and easily retrieve old versions of that file later. It’s basically a backup system, but it does so much more than backup. For example, source control systems can make it very easy for people to collaborate on a project, editing and changing files for a project together, from separate computers.

GitHub provides git repository hosting. They provide free hosting for open-source/publicly-accessible projects, and have reasonable paid hosting plans for private projects.

Git can take a little time to get used to, fortunately the official git website has some great tutorials to get you started. GitHub also has tutorials, as well. Though, I would say the easiest way to learn Git is from a friend or colleague. I’d highly recommend David Pratt’s quick tutorial, maybe someday I can con him into publishing something online.

If, like me, you’d rather just get-work-done and don’t care for command line source control tools unless absolutely necessary, I’d highly recommend downloading SourceTree, which is a free high-quality GUI Git client.

If you’re a Subversion die-hard, SourceForge is basically GitHub for svn, so you can share there instead if you prefer. Alternatively, many web hosts such as dreamhost (the host I use) now provide Subversion and/or Git hosting solutions.

I’d recommend Git over Subversion for a few reasons:

  • Sourcetree is an amazing tool, on par with many of the paid clients for Subversion for non-windows users. (If you’re on windows, tortoisesvn is a pretty amazing free tool as well.)
  • Git works offline, as the entire repository is cached on your local box. So you can commit piecemeal parts on your box, then “push” a bunch of commits home when you’re back online. Another major advantage of this offline feature is that you can almost-instantly revert changes or look at older changes without remote-server latency problems.
  • Git merges better in many situations.
  • Git allows you to work locally and micro-commit just like you would with Subversion, but you don’t actually have to push all of your work remote to work in git in small increments. If you want, you can even “squash” several commits into one.
  • Git stores all repository information in a simple “.git” file at the top of your repository tree, so manually cleaning repository junk is as simple as deleting that one directory if you need to, which is even easier than a svn export.

There are other reasons users smarter than I would recommend Git, and there can be some confusing aspects to working in Git that will be foreign to someone familiar with svn, but the change will be worth it after only a little while.

A really great time to consider switching to Git is the next time you hit some merge hell with subversion where you *thought* subversion would just figure it out, but doesn’t. In many of those cases, Git does what subversion will not.

I’d recommend publishing your open source code to GitHub if you don’t already have a better place to store it. For me, pushing to github is something I’ve been meaning to do for a long while. It’s just easier to push to GitHub than manually zip and prep code pages here on my wordpress installation on coder cowboy.

A quick word about my inspiration to finally make the leap, today I saw a thread on KLOV about Seattle arcades, and someone posted a link to this amazing site: Pinball Map. Pinball Map’s home page mentions that the site is open source on Scott Wainstock’s GitHub page, which means maybe I or someone else can make an arcade maps page fairly easily in the future, all thanks to Scott. Also, you absolutely must check out Scott’s amazing iHodor app.