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

Re: git branch descriptions

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 11, 2010, 07:44 UTC
Message-ID
<4BE90ADF.7020503@drmicha.warpmail.net>
In-Reply-To
<20100510232612.GA6890@progeny.tock>
Jonathan Nieder venit, vidit, dixit 11.05.2010 01:26:
Show 31 quoted lines
> Hi,
> 
> Joel Reed wrote:
> 
>> Working on a wide range of topics/branches from week to week and
>> project to project, it's sometimes difficult to quickly remember
>> what each branch is about, without doing a git diff master <branch>.
>>  I like to keep branch names short so they're easy to switch to and
>> from, but being able to attach a description that would display when
>> doing a "git branch" would be a huge help.
> 
> I think the closest thing we have now is ‘git branch -v’, which tells
> the subject of the commit at the tip of the branch.  ‘git notes’
> annotates commits rather than branches, so it occupies a different
> niche.
> 
> Your request is a reasonable one, and it has come up a few times in
> different forms over the years:
> 
>  . per-branch descriptions in .git/description[1]
>  . per-branch descriptions in .git/config[2][3]
>  . README branch whose files describe the branches[4]
> 
> Number [2] is my preferred choice (and comes with code!), for what
> it’s worth.
> 
> That doesn’t address the problem of how to _share_ branch
> descriptions.  That could be dealt with by extending the wire protocol
> as in [1], I think.  Just sharing a list of branch descriptions is a
> bad idea imho, since related repositories need to be able to name
> their branches independently to avoid painful coordination problems.

I have a mostly working idea (working when done "manually") on how to use notes for that. As we, know, we can share notes without overriding our own notes (and improving the merge/combine facilities would benefit all note users). I'll try to come up with a proof-of-concept patch, but probably not before next week.

Michael
Previous: Joel ReedNext: Joel Reed
Message 6 of 10 in “git branch descriptions”
  1. Joel ReedMay 10, 2010
  2. Ramkumar RamachandraMay 10, 2010
  3. Jonathan NiederMay 10, 2010
  4. Geert BoschMay 11, 2010
  5. Joel ReedMay 11, 2010
  6. Michael J GruberMay 11, 2010
  7. Joel ReedMay 11, 2010
  8. Joel ReedMay 11, 2010
  9. Ævar Arnfjörð BjarmasonMay 11, 2010
  10. Joel ReedMay 11, 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.