Comment by 827a

8 months ago

Why would I choose to stash information like this in the git notes, versus just appending it to the commit message itself?

Because you would not want to write the whole git history starting from the commit you want to stash this info one everytime you want to stash additional info …

Appending information to the commit itself creates a new commit and all the commits that are based on the commit will also have to change consequently.

  • Ah; so notes don't impact the commit hash? That is a solid reason.

    • Yeah, git notes are AFAIK stashed into their own hidden branch, referencing the original commit by its hash. That is, the git note points to the commit, not the opposite.

      1 reply →