Git, but simpler (to use, maybe…)

Game of trees logo

I’m a long time Mercurial user. Even so, I keep my eye on other VCS’s to see what new ideas are developing. A few weeks ago, I came across Got, a reimplementation / reimagining of Git for use by the OpenBSD people, under a BSD compatible licence.

Got claims to take some of the best features from CVS, SVN, Git, Mercurial and Fossil. This I found very interesting. Here are the most noticeable differences I’ve noticed (for a Git or Mercurial user).

  • Repositories must checked out to a worktree.

Hg and Git users are used to having the repository inside the worktree (working directory). Got treats a repository and a worktree as two completely different things. Or rather, Got treats the repository as one thing and you can have as many worktrees as you need. The benefit of this model is that you can have different branches checked out at the same time. You can checkout only a subset of the repository. This is also the same model that Fossil uses. When I tried using Fossil years ago, I intensely disliked this “feature”, but I’m now starting to think it makes sense.

  • No built in help

As always, OpenBSD prefers to have excellent man pages to document their software and answer any question you might have.

simon@computer:~$ got help
got: unknown command 'help'
commands: init import clone fetch checkout update log diff blame tree status ref branch tag add remove patch revert commit send cherrypick backout rebase histedit integrate merge stage unstage cat info

Whether that’s planned to change, I’m not sure. Probably not.

  • Some important features are currently missing

Last time I checked, file renames weren’t automatically handled. I believe this is planned to change. Little, quality of life features like hg email will probably never be implemented.

  • There’s a steeper learning curve

You really do have to RTFM when it comes to Got. I got stuck on some basic stuff and asked on IRC for assistance. The lead developer, Stefan Sperling is actually a very helpful guy and got me going. Still, be prepared to read the entire man page!

Features I’d love to see

  • hg shelve / Git stash

Set aside changes and bring them back later. Very useful, (nearly) impossible to live with once you’ve used it.

  • Easy emailing of patches

I use hg email -r tip all the time when I’m working on a project.

  • Local revision numbers

Mercurial is (I think) the only current VCS that has local revision numbers. That feature is just so handy. Much easier for humans to deal with revision 17 than revision bf63491f5a5b

Conclusion

Got makes it clear on their website they aren’t seeking to replace anything or to steal you away from your VCS of choice. In the FAQ they state:

If you are wondering why Got even exists, you can just ignore it.

Quite right. There are far too many people on the internet moaning that their thing is the only thing that matters and if everyone would just use it everyone would be far happier as a result. Got isn’t one of those projects.

It’s written by, and for, the OpenBSD crew. There’s a portable port for us Linux types. I’ll be keeping an eye on this one in case it ends up as useful as OpenSMTPD