{"thread":{"id":"23765","subject":"git branch descriptions","startedAt":"2010-05-10T14:56:37Z","lastAt":"2010-05-11T12:58:56Z","messageCount":10,"participants":["Joel Reed","Ramkumar Ramachandra","Jonathan Nieder","Geert Bosch","Michael J Gruber","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"141402","messageId":"657A681BEF27534399890012B8C8E50E1AD63D1FEA@lcs-exchange01.Lantekcs.com","threadId":"23765","inReplyTo":null,"subject":"git branch descriptions","fromName":"Joel Reed","fromEmail":"jreed@lantekcs.com","sentAt":"2010-05-10T14:56:37Z","receivedAt":"2010-05-10T14:56:37Z","isPatch":false,"sender":{"key":"jreed@lantekcs.com","avatar":null},"body":"First, let me extend my thanks for a great version control tool. Git has enhanced my productivity tremendously - I appreciate the Git team's focus on performance, usability, and correctness. Awesome work.\n\nI've used git in several jobs now and keep coming back to _really_ wishing I could attach a description to some of my branches. 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.\n\nMy only intention with this email is to say \"thanks\" and put in a vote for git branch descriptions.\n\njr\n"},{"id":"141403","messageId":"AANLkTin9e0-Zyk1RTpp3hFA0-Wqclabd2JQZAuxd74gG@mail.gmail.com","threadId":"23765","inReplyTo":"657A681BEF27534399890012B8C8E50E1AD63D1FEA@lcs-exchange01.Lantekcs.com","subject":"Re: git branch descriptions","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-05-10T15:08:55Z","receivedAt":"2010-05-10T15:08:55Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\n> I've used git in several jobs now and keep coming back to _really_ wishing I could attach a description to some of my branches. 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.\n\nI think git-notes(1) is the closest thing to what you want.\n\n-- Ram\n"},{"id":"141445","messageId":"20100510232612.GA6890@progeny.tock","threadId":"23765","inReplyTo":"657A681BEF27534399890012B8C8E50E1AD63D1FEA@lcs-exchange01.Lantekcs.com","subject":"Re: git branch descriptions","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-05-10T23:26:12Z","receivedAt":"2010-05-10T23:26:12Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJoel Reed wrote:\n\n> Working on a wide range of topics/branches from week to week and\n> project to project, it's sometimes difficult to quickly remember\n> what each branch is about, without doing a git diff master <branch>.\n>  I like to keep branch names short so they're easy to switch to and\n> from, but being able to attach a description that would display when\n> doing a \"git branch\" would be a huge help.\n\nI think the closest thing we have now is ‘git branch -v’, which tells\nthe subject of the commit at the tip of the branch.  ‘git notes’\nannotates commits rather than branches, so it occupies a different\nniche.\n\nYour request is a reasonable one, and it has come up a few times in\ndifferent forms over the years:\n\n . per-branch descriptions in .git/description[1]\n . per-branch descriptions in .git/config[2][3]\n . README branch whose files describe the branches[4]\n\nNumber [2] is my preferred choice (and comes with code!), for what\nit’s worth.\n\nThat doesn’t address the problem of how to _share_ branch\ndescriptions.  That could be dealt with by extending the wire protocol\nas in [1], I think.  Just sharing a list of branch descriptions is a\nbad idea imho, since related repositories need to be able to name\ntheir branches independently to avoid painful coordination problems.\n\n> My only intention with this email is to say \"thanks\" and put in a\n> vote for git branch descriptions.\n\nThe best vote is to write a sample script for yourself, try it out,\nand tell us how it goes. :)\n\nThanks for bringing this up.\nJonathan\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/8130/focus=8187\n[2] http://thread.gmane.org/gmane.comp.version-control.git/33528/focus=33563\n[3] http://thread.gmane.org/gmane.comp.version-control.git/46855/focus=47077\n[4] http://thread.gmane.org/gmane.comp.version-control.git/93333/focus=93491\n"},{"id":"141448","messageId":"F658FEF6-8957-4815-8917-8545E166F6CC@adacore.com","threadId":"23765","inReplyTo":"20100510232612.GA6890@progeny.tock","subject":"Re: git branch descriptions","fromName":"Geert Bosch","fromEmail":"bosch@adacore.com","sentAt":"2010-05-11T01:16:23Z","receivedAt":"2010-05-11T01:16:23Z","isPatch":false,"sender":{"key":"bosch@adacore.com","avatar":null},"body":"\nOn May 10, 2010, at 19:26, Jonathan Nieder wrote:\n> I think the closest thing we have now is ‘git branch -v’, which tells\n> the subject of the commit at the tip of the branch.  ‘git notes’\n> annotates commits rather than branches, so it occupies a different\n> niche.\n\nIndeed, I've not started to use the -v flag a lot more and wish\nit were default. However, when I started to think about attaching\ndescriptions or any other information to branches, I started\nto realize what we'd lose with that.\n> \n> Your request is a reasonable one, and it has come up a few times in\n> different forms over the years:\n> \n> . per-branch descriptions in .git/description[1]\n> . per-branch descriptions in .git/config[2][3]\n> . README branch whose files describe the branches[4]\n> \n> Number [2] is my preferred choice (and comes with code!), for what\n> it’s worth.\n\nThe question is what you'd do with these when moving branches around.\nYou could move the descriptions with the branches, though that would be\na bit ugly implementation-wise: I don't quite like the idea of programs\nrewriting configuration files as part of regular operation.\n\nBesides that, I find my self often use a workflow like:\n\n% git checkout -b newtopic\n% (hack, commit, hack, commit, ...)\n% git log\n% (oops, better fix up those revision histories)\n% git checkout -b newtopic-fixup newtopic~2\n% git cherry-pick newtopic~1 ; git commit --amend ; rinse ; repeat\n% (ok, finished, pretend the old stuff never happened)\n% git branch -M newtopic\n\nIf branches were more than just a way of naming a place to\nput commits, it would be getting much more heaving to do this\nkind of thing.\n\nThe other approach, of leaving them in place wouldn't be much\nmore appealing either.\n\nIt seems if we'd do branch descriptions at all, their main use\nwould be fore remote repositories. When you publish a branch,\nyou'd typically not rewrite it on a whim, so attaching a description\nmakes sense. Similarly, if you're tracking a remote repository,\nit would be helpful to get some information for the branch.\n\nFor local repositories, I have been amazed how useful the git branch -v is.\nAnd it comes for free, no need to enter any data!\n\nRegards,\n   -Geert"},{"id":"141462","messageId":"4BE90ADF.7020503@drmicha.warpmail.net","threadId":"23765","inReplyTo":"20100510232612.GA6890@progeny.tock","subject":"Re: git branch descriptions","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-11T07:44:31Z","receivedAt":"2010-05-11T07:44:31Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jonathan Nieder venit, vidit, dixit 11.05.2010 01:26:\n> Hi,\n> \n> Joel Reed wrote:\n> \n>> Working on a wide range of topics/branches from week to week and\n>> project to project, it's sometimes difficult to quickly remember\n>> what each branch is about, without doing a git diff master <branch>.\n>>  I like to keep branch names short so they're easy to switch to and\n>> from, but being able to attach a description that would display when\n>> doing a \"git branch\" would be a huge help.\n> \n> I think the closest thing we have now is ‘git branch -v’, which tells\n> the subject of the commit at the tip of the branch.  ‘git notes’\n> annotates commits rather than branches, so it occupies a different\n> niche.\n> \n> Your request is a reasonable one, and it has come up a few times in\n> different forms over the years:\n> \n>  . per-branch descriptions in .git/description[1]\n>  . per-branch descriptions in .git/config[2][3]\n>  . README branch whose files describe the branches[4]\n> \n> Number [2] is my preferred choice (and comes with code!), for what\n> it’s worth.\n> \n> That doesn’t address the problem of how to _share_ branch\n> descriptions.  That could be dealt with by extending the wire protocol\n> as in [1], I think.  Just sharing a list of branch descriptions is a\n> bad idea imho, since related repositories need to be able to name\n> their branches independently to avoid painful coordination problems.\n\nI have a mostly working idea (working when done \"manually\") on how to\nuse notes for that. As we, know, we can share notes without overriding\nour own notes (and improving the merge/combine facilities would benefit\nall note users). I'll try to come up with a proof-of-concept patch, but\nprobably not before next week.\n\nMichael\n"},{"id":"141472","messageId":"657A681BEF27534399890012B8C8E50E1AD63D2236@lcs-exchange01.Lantekcs.com","threadId":"23765","inReplyTo":"20100510232612.GA6890@progeny.tock","subject":"RE: git branch descriptions","fromName":"Joel Reed","fromEmail":"jreed@lantekcs.com","sentAt":"2010-05-11T12:33:54Z","receivedAt":"2010-05-11T12:33:54Z","isPatch":false,"sender":{"key":"jreed@lantekcs.com","avatar":null},"body":"Jonathan Nieder wrote:\n> > Working on a wide range of topics/branches from week to week and\n> > project to project, it's sometimes difficult to quickly remember\n> > what each branch is about, without doing a git diff master <branch>.\n> > I like to keep branch names short so they're easy to switch to and\n> > from, but being able to attach a description that would display when\n> > doing a \"git branch\" would be a huge help.\n> \n> I think the closest thing we have now is ‘git branch -v’, which tells\n> the subject of the commit at the tip of the branch.  ‘git notes’\n> annotates commits rather than branches, so it occupies a different\n> niche.\n\nI'm more looking for the description of the branch, not the last commit, but I did not know about this option and will give it a try. Thanks for the tip! \n\n> Your request is a reasonable one, and it has come up a few times in\n> different forms over the years:\n> \n>  . per-branch descriptions in .git/description[1]\n>  . per-branch descriptions in .git/config[2][3]\n>  . README branch whose files describe the branches[4]\n> \n> Number [2] is my preferred choice (and comes with code!), for what\n> it’s worth.\n\nMy number one need is just to be able to add a description to local branches so I don't forget why I made them weeks later.\n\nI have noticed when browsing around on gitweb/github looking at available branches that I sometimes wish I knew a bit more about the branch as well so I can see the need to see remote descriptions as well. Sharing the descriptions isn't of much interest to me personally.\n\njr\n"},{"id":"141473","messageId":"657A681BEF27534399890012B8C8E50E1AD63D2241@lcs-exchange01.Lantekcs.com","threadId":"23765","inReplyTo":"F658FEF6-8957-4815-8917-8545E166F6CC@adacore.com","subject":"RE: git branch descriptions","fromName":"Joel Reed","fromEmail":"jreed@lantekcs.com","sentAt":"2010-05-11T12:38:47Z","receivedAt":"2010-05-11T12:38:47Z","isPatch":false,"sender":{"key":"jreed@lantekcs.com","avatar":null},"body":"Geert Bosch wrote:\n\n<snip>\n\n> It seems if we'd do branch descriptions at all, their main use\n> would be fore remote repositories. When you publish a branch,\n> you'd typically not rewrite it on a whim, so attaching a description\n> makes sense. Similarly, if you're tracking a remote repository,\n> it would be helpful to get some information for the branch.\n\nFor my usage, I have to strongly disagree! I _primarily_ wish I could add a description to LOCAL branches.\n\njr\n"},{"id":"141474","messageId":"657A681BEF27534399890012B8C8E50E1AD63D2244@lcs-exchange01.Lantekcs.com","threadId":"23765","inReplyTo":"4BE90ADF.7020503@drmicha.warpmail.net","subject":"RE: git branch descriptions","fromName":"Joel Reed","fromEmail":"jreed@lantekcs.com","sentAt":"2010-05-11T12:39:58Z","receivedAt":"2010-05-11T12:39:58Z","isPatch":false,"sender":{"key":"jreed@lantekcs.com","avatar":null},"body":"Michael J Gruber wrote:\n\n<snip>\n\n> > Your request is a reasonable one, and it has come up a few times in\n> > different forms over the years:\n> >\n> >  . per-branch descriptions in .git/description[1]\n> >  . per-branch descriptions in .git/config[2][3]\n> >  . README branch whose files describe the branches[4]\n> >\n> > Number [2] is my preferred choice (and comes with code!), for what\n> > it’s worth.\n> >\n> > That doesn’t address the problem of how to _share_ branch\n> > descriptions.  That could be dealt with by extending the wire protocol\n> > as in [1], I think.  Just sharing a list of branch descriptions is a\n> > bad idea imho, since related repositories need to be able to name\n> > their branches independently to avoid painful coordination problems.\n> \n> I have a mostly working idea (working when done \"manually\") on how to\n> use notes for that. As we, know, we can share notes without overriding\n> our own notes (and improving the merge/combine facilities would benefit\n> all note users). I'll try to come up with a proof-of-concept patch, but\n> probably not before next week.\n\nSounds awesome! If I can help test in anyway please let me know.\n\njr\n"},{"id":"141475","messageId":"AANLkTimhCBNyJv6b9AT578AC4H1_zsB2CgfsrveNpNNE@mail.gmail.com","threadId":"23765","inReplyTo":"657A681BEF27534399890012B8C8E50E1AD63D1FEA@lcs-exchange01.Lantekcs.com","subject":"Re: git branch descriptions","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-05-11T12:54:26Z","receivedAt":"2010-05-11T12:54:26Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, May 10, 2010 at 14:56, Joel Reed <jreed@lantekcs.com> wrote:\n\n> I like to keep branch names short so they're easy to switch to and\n> from, but being able to attach a description that would display when\n> doing a \"git branch\" would be a huge help.\n\nOr you could just use long branch names coupled with bash completion\n(or something like that) so it isn't hard to switch between branches\nwith long names.\n\nI use branch names that are long enough so that I can tell what\nthey're for by looking at the name, using them isn't a pain due to\nbash/magit completion.\n"},{"id":"141476","messageId":"657A681BEF27534399890012B8C8E50E1AD63D2268@lcs-exchange01.Lantekcs.com","threadId":"23765","inReplyTo":"AANLkTimhCBNyJv6b9AT578AC4H1_zsB2CgfsrveNpNNE@mail.gmail.com","subject":"RE: git branch descriptions","fromName":"Joel Reed","fromEmail":"jreed@lantekcs.com","sentAt":"2010-05-11T12:58:56Z","receivedAt":"2010-05-11T12:58:56Z","isPatch":false,"sender":{"key":"jreed@lantekcs.com","avatar":null},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> > I like to keep branch names short so they're easy to switch to and\n> > from, but being able to attach a description that would display when\n> > doing a \"git branch\" would be a huge help.\n> \n> Or you could just use long branch names coupled with bash completion\n> (or something like that) so it isn't hard to switch between branches\n> with long names.\n> \n> I use branch names that are long enough so that I can tell what\n> they're for by looking at the name, using them isn't a pain due to\n> bash/magit completion.\n\nGood point, perhaps for now I should use branch.names.like.this\n\njr\n"}]}