News for hackers. Stuff that matters.
Re:Git Branches: Intuition and Reality by pdonis on Thursday November 23, 2023 @06:03PM (#38398719)
> The branch name isn't even part of the patch.

More generally, the branch name is not stored with commits; it has to be computed by walking back from the branch tips, and commits can have multiple possible branch names based on this. In other words, git does not preserve information about which branch was actually active when you made a particular commit. (Mercurial, by contrast, stores the branch that was active when a commit was made in the commit, so that information is preserved.) The article discusses some implications of this, although it doesn't phrase it quite the way I did above.

There are no comments on this comment yet.