RE: git branch descriptions
Show 11 quoted lines
> > 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.
I'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!
Show 9 quoted lines
> 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.
My 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.
I 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.
jr