As we all know:

Git gets easier once you understand branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space

Which seems like jargon, but on the other hand,

All told, a monad in X is just a monoid in the category of endofunctors of X, with product × replaced by composition of endofunctors and unit set by the identity endofunctor.

is funny because it is true.

Can I avoid merging mistakes by reading this simple text?

  • 8
    As a git enthusiast and someone who has a Master's in applied mathematics, I suspect the answer is "No". – joshin4colours Sep 16 '14 at 21:14
  • 1
    Sounds like someone tried to read a math book, but failed. – tp1 Sep 16 '14 at 21:34
  • 11
    I don't understand why people are voting to close on the basis that what I am asking is unclear. I am asking if the phrase I quoted is factual. (The phrase I quoted is widespread, as you can confirm with Google.) – Larry OBrien Sep 16 '14 at 22:39
  • 2
    recommended reading: Discuss this ${blog} – gnat Sep 17 '14 at 9:31
  • 5
    Once you've spent some time attempting to get the meaning of that sentence, Git really might seem comparatively easier to understand than before… – stakx Sep 17 '14 at 20:08

It's a joke, that is based on the monad joke, but without actually getting the monad joke.

The monad joke is funny on three levels:

  1. it tries to explain abstract mathematical jargon with even more mathematical jargon, which is even more abstract
  2. however, the explanation is actually correct
  3. and once you dive deeper into category theory, you will actually start to see monads as "just a monoid in the category of endofunctors"

The Git thing, however, is just random gibberish. It is meant to resemble the monad joke, and might also be a jab at the darcs patch theory, but fundamentally, the person making the joke didn't understand the monad joke.


This is the original tweet containing the quote:

Wil Shipley (‏@wilshipley): Sweet god I hate git.

Isaac Wolkerstorfer (‏@agnoster): @wilshipley git gets easier once you get the basic idea that branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space.

And this is a comment on Quora by the original author of the tweet:

To confirm what Leo said, it was intended as a joke. […]

It was intended as firmly tongue-in-cheek. I actually love git, and I think its complexity is greatly overblown. At the same time, I'm sympathetic to the fact that advice from git gurus to novices can end up sounding like inscrutable gibberish.

It's not intended to have any deeper meaning. […]

The Leo he is referring to is another answerer in the same thread, a mathematician, who basically explains why that is nonsense. (Hilbert spaces are continuous, patches and branches are discrete.)

He also explains that he was inspired by this blog post (A Guide to GIT using spatial analogies), which actually does make sense.

  • 15
    That's disappointing. – Larry OBrien Sep 16 '14 at 22:44
  • 3
    @amon: I added a quote by the author of that joke, wherein he explains that any sense that statement would potentially make is purely coincidental: "Attempts to analyze it in this fashion should be futile, but due to a bug in reality, you can actually make any sufficiently hand-wavy statement fit if you try hard enough." – Jörg W Mittag Sep 17 '14 at 8:21
  • 1
    +1 for discrete vs continuous reasoning to rule out why this statement is incorrect :) – joshin4colours Sep 17 '14 at 20:36
  • 7
    I've always assumed that the author of the joke did get the monad joke but was purposely descending in to gibberish as a parody. One of those things that starts out plausible and becomes steadily less so until only at the end can you be sure its gibberish. It seems uncharitable to conclude he didn't get the monad joke. – psr Sep 19 '14 at 22:56
  • 1
    You might find this explanation git bisect useful in explaining the joke. Note the author. – user40980 Sep 20 '14 at 13:53

It's a joke, as confirmed by the author and Jörg W Mittag's answer explains in more detail.

But truth can be stranger than fiction…

There has been work of formalizing version control, in particular patch theory by David Roundy which is the basis of Darcs (a distributed version control system that preceded the more popular Bazaar, Git and Mercurial by a couple of years but never reached their popularity). The main objective of the theory is to model merging and, in particular, conflict resolution. The Darcs wiki has an introduction to the theory and a few pointers as well as a bibliography (unmaintained so outdated if you want a recent view on the subject, but it does list a 2009 survey paper by Petr Baudiš) and a list of talks (which includes more recent material). There's also a wikibook. One seminal paper is A Principled Approach to Version Control by Andres Löh, Wouter Swierstra and Daan Leijen3.

Patch theory does lead to a categorical model, which has been more recently explored in A Categorical Theory of Patches by Samuel Mimram and Cinzia Di Giusto and Homotopical Patch Theory by Carlo Angiuli, Ed Morehouse, Daniel R. Licata and Robert Harper. In Mimram and Di Giusto's work, the model has files as objects and patches as morphisms. I think that makes merging a branch a functor — an endofunctor if you're working in a single repository. “Homeomorphic endofunctor” doesn't make sense to me. And with homotopy theory involved (a concept from calculus — that's the branch of mathematics that studies things like manifolds and Hilbert spaces — which has recently been applied to a fundamental model of mathematics called homotopy type theory), submanifolds of a Hilbert space might not be so far out...

  • Also, Darcs is written in Haskell, so it's built on monads. :-) – Wyzard Aug 19 '15 at 1:50

protected by gnat Sep 18 '14 at 6:56

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.