Comment on Why Git is hard

<- View Parent
sushibowl@feddit.nl ⁨1⁩ ⁨year⁩ ago

A git branch is just a pointer to a commit, it really doesn’t correspond to what we’d naturally think of as a branch in the context of a physical tree or even in a graph.

But as the article points out, a commit includes all of its ancestors. Therefore pointing to a commit effectively is equivalent to a branch in the context of a tree.

Some other version control systems like mercurial have both a branch in a more intuitive sense (commits have a branch as a bit of metadata), as well as pointers to commits (mercurial, for example, calls them bookmarks).

I mean, git has bookmarks too, they’re called tags.

source
Sort:hotnewtop