Monday, March 15, 2010

Git Achievements

This weekend I created a little application called git achievements. Similar to the XBox360 Achievements you can unlock all sorts of Achievements while you use git. It brings a bit of fun (and bragging) to those who use or who are learning git.
Almost all of the git commands have achievements of different levels (depending on number of times a command is used). For example you can become a "Apprentice Author" after only two commits, "Author" after sixteen and finally a "Master Author" after 128 commits. Various other Achievements can be unlocked just be performing an action such as adding a .gitignore file or setting your user name in git config. When you unlock an achievement you will get a message on your console showing the new achievement like so:
******************************************************************
Git Achievement Unlocked!

Caretaker
Added a .gitignore file to a repository.
******************************************************************
Having collected all of these achievements you can set a git config flag and have it automatically publish your achievements to your github pages. The published page includes a list of all of your unlocked achievements, total points as well as a list of achievements that are still locked. I have my git achievements published so you can checkout the full list of achievements.

Installation is a snap, after forking and cloning the repository just add git-achievments to your path and alias git=git-achievements.

Creating this was a lot of fun. It was simple and a bit silly. After getting the idea I had something working in no time at all. It was fun coming up with the different names for the Achievements and as I was working on the project unlocking them. Originally I had only planned to create the output to the console, but it only took a few minutes to realize just how easy it was to publish to GitHub Pages which brought the achievements to a whole fun new level. Achievements in video games often causes the user to explore parts of the game that they might not have and often cause them to learning actions that they might otherwise ignore. I am not sure if git achievements is very useful as a learning tool, but it is fun to have installed and popup with a new achievement now and then. If there is a trick in Git that you think other people don't know about or should learn let me know (or send me a merge request) and i'll make a new achievement for it.

Photo by terren in Virginia under the cc license.

Popular Posts