Having single word git branch names is incredibly frustrating. I try to use same branch names as issue ids, which makes it even less descriptive. Finally I found that the current stable git version supports editing branch descriptions, but not displaying them (conveniently).
To describe a branch, use
git branch --edit-description,
edit the opened file, save and exit. If one editor does not work,
try another. For me Sublime does not work in this case, but vi does.
alternative: for single line descriptions use
git config branch.<branch name>.description "describe branch".
To show description of a branch, use command
git config branch.<branch name>.description. Pretty obvious, right?
git branch still only shows the list of branch names,
without descriptions. I wrote a small Bash script
to grab all branch names, then query each description and finally
display same output as
git branch but with extra column
$ ./branches.sh * master this is master branch one this is simple branch for testing
One can also just put the functionality directly into
.alias file to has
branches command available everywhere, see