Git Koans (2013)
Sadly the inconsistent and baroque command line interface of git for basic stuff is the least of its problems -- learning it is just a one time sunk cost every developer has to pay these days.<p>What&#x27;s more troubling is that git can&#x27;t do some very basic stuff well, like merging branches. I mean you can do the merge, but good luck trying to revert it[+] or trying to get git to deal intelligently with non-linear history in general.<p>Another fun thing is that every git repo starts its life with an off-by-one error: there is no canonical (and identical) first &quot;root&quot; commit, a NIL commit if you will. This is unfortunate for two reasons:<p>1. A lot of common scripting idioms will break on the first actual commit (e.g. finding changed files via  git diff --name-only A A^ will not work if A is the first commit; yes it&#x27;s possible to work around that, just like you can write shell scripts that deal with filenames with spaces). Also, it would be convenient in many cases to have an canonical initial empty NIL commit as symbolic reference, similar to how having HEAD is handy.<p>2. More subtle: the fact that there is no common shared root commit between arbitrary repos makes a couple of things more involved and confusing than they would otherwise be, for example rewriting several different repos into one after the fact.<p>In theory it would be possible to work around that by everyone agreeing on a canonical first commit to start each repo with, but in practice that&#x27;s of course unlikely to happen.<p>Lastly, and not entirely unrelated: many, but no good solutions for sub-repositories.<p>[+]  <a href="https:&#x2F;&#x2F;github.com&#x2F;git&#x2F;git&#x2F;blob&#x2F;master&#x2F;Documentation&#x2F;howto&#x2F;revert-a-faulty-merge.txt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;git&#x2F;git&#x2F;blob&#x2F;master&#x2F;Documentation&#x2F;howto&#x2F;r...</a>