GitHub Repositories Feed
I noticed at the bottom of the page on GitHub that there was an API link. I took a look at it and found it to be pretty interesting, it's actually really simple to use. You can export in xml, json and yaml. I thought to myself: "Hey it'd be great if I could put a repositories feed in the sidebar of my blog here!".
So I took a look at the JSON output since it's small and really easy to deserialize in php, so I wrote up a quick little php script on the server I'm hosting my blog at that will spit out an RSS feed of the repositories I've created on GitHub. The code is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <?="<?xml version=\"1.0\"?>"?> <rss version="2.0"> <channel> <title>BeMasher's GitHub Repositories</title> <link>http://github.com/bemasher</link> <description>BeMasher's GitHub Repositories</description> <language>en-us</language> <pubDate><?=date("D, d M Y G:i:s e")?></pubDate> <lastBuildDate><?=date("D, d M Y G:i:s e")?></lastBuildDate> <webMaster>bemasher@bemasher.net</webMaster> <ttl>5</ttl> <?php $data = file_get_contents("http://github.com/api/v2/json/repos/show/bemasher"); $data = json_decode($data, true); $today = date("D, d M Y G:i:s e"); foreach($data["repositories"] as $repository) { echo <<<ITEM <item> <title>{$repository["name"]}</title> <link>{$repository["url"]}</link> <description>{$repository["description"]}</description> <pubDate>$today</pubDate> <guid>{$repository["url"]}</guid> </item> ITEM; } ?> </channel> </rss> |
And if you look to the right you can see the RSS Widget in action displaying the output of the script. Cool huh?
GitHub Won
In lieu of my Git vs. Mercurial post I've pretty much decided to stick with GitHub due to it's extreme ease of migrating subversion repositories to it. While I'm sure it's going to take me a little while to get used to the GUI for MSysGit (or find a better client) I've decided to move all of my current version control to GitHub.
You can find all my repositories here: http://github.com/bemasher/. Feel free to follow me on there, I'm always looking to meet other tech-friendly people.
Free Hosting for Git vs. Mercurial
A co-worker and I were talking about version control software and he made an interesting comparison: Git is like MacGuyver and Mercurial is like James Bond. He then proceeded to point me in the direction of GitHub and Bitbucket.
From first impression both seem to have the same basic set of tools and features. Both have built in simple wiki's and issue trackers. Both allow unlimited public repositories limited only by disk space, 150MB for Mercurial and 300MB for GitHub. Mercurial allows one private repository while GitHub allows no private repositories without a paid plan.
Both of them have fatal flaws for Windows users. First off, GitHub is the most enticing because they offer an integrated subversion repository importing, just give it the URL to a SVN repository and you can import all the authors and history of it. Bitbucket however doesn't seem to have this feature, I'll continue looking for a simple way to do this but right now that's a major flaw in Bitbucket because all of my repositories until this point have been on xp-dev a free SVN hosting service I talked about in my Free Subversion Hosting post.
The major fatal flaw in GitHub for Windows users is that there's not really any solid Git clients to use with it at the moment. There's MSysGit which provides a very basic GUI and command line tools which is great but not very integrated or simple to pick up and use. There's a project for porting TortoiseSVN to TortoiseGit, though at the moment it heavily relies on MSysGit except it uses it's own ssh client plink instead of the OpenSSH library that MSysGit uses which means running pageant to manage your keys and importing and creaking a ppk of your private keys for use with GitHub.
Mercurial seems to have a major fix for the main problem with Git's poor selection of Windows clients is a major issue for usefulness in Windows. Mercurial wins this particular aspect of the competition. Mercurial has TortoiseHg which is pretty stable so far.
When it's all said and done Bitbucket and GitHub are more or less equivalent services built on top of two different version control projects.

