git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git Notes on Branches

From
JSJoshua Shrader <jshrader83@gmail.com>
Date
Jul 22, 2010, 20:22 UTC
Message-ID
<AANLkTinnDBUzoDj-C289l4Kui2qSiKmF-027MzijyCFY@mail.gmail.com>

I'm wondering if there is a way to (or a reason that would prevent one from implementing a feature that allows one to) associate a note with a branch, rather than a specific object. It seems like a notes object contains a reference to the object that it annotates:

Annotate 4bd93734af...

Rather than forcing this to be a SHA1, can the same approaches as taken with HEAD be employed? That is, allow it to be either an object ID, or a local branch?

This would essentially define a new use case for notes. Rather than just being used to annotate objects, they could be used to describe a feature branch or a bug fix, for example. Then, when a release is created (from, say, master), a "git branches --merged" will show all merged branches. Assuming the workflow is to develop on well-defined branches, if each of these branches had a description in an attached note, created Release Notes would be a piece of cake. Add a description via "git notes add feat-branch-2" that you want to show up in the Release Notes once the branch is re-integrated.

I see a potential problem when working remotely and trying to push the note to origin, but I don't think its insurmountable.

Thoughts?
Josh
Next: Jonathan Nieder
Message 1 of 2 in “Git Notes on Branches”
  1. Joshua ShraderJul 22, 2010
  2. Jonathan NiederJul 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.