We’ve blogged about Git gamification before. Now, Gary Rennie has released Githug which challenges players to complete levels and learn Git features at the same time. Levels are created using a Ruby-based DSL:
difficulty 1
description "There is a file in your folder called README, you should add it to your staging area"
setup do
repo.init
FileUtils.touch("README")
end
solution do
return false unless repo.status.files.keys.include?("README")
return false if repo.status.files["README"].untracked
true
end
hint do
puts "You can type `git` in your shell to get a list of available git commands"
end
Got an idea for a Githug level? Submit a patch.