Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view branch descriptions (without editing them)?

Tags:

git

If one has previously entered a description for some branch FOO, by running

% git branch --edit-description FOO

...is there a way to view this description (other than running this same command again, i.e. other than re-editing the branch description)?


BTW, I've tried a couple of things, such as:

% git branch -av
  FOO    ca2fff9 (mumble)
* master ca2fff9 (mumble)
% git show-branch FOO
[FOO] (mumble)

...but no dice.

like image 428
kjo Avatar asked Aug 29 '13 17:08

kjo


People also ask

What is the git command to view all the remote branches?

To view your remote branches, simply pass the -r flag to the git branch command. You can inspect remote branches with the usual git checkout and git log commands.

How do I add a description to a git branch?

Branch description, can be edited with git branch --edit-description . Branch description is automatically added in the format-patch cover letter or request-pull summary.


1 Answers

You can see the description for all branches with:

git config --get-regexp branch.*.description

git config is what a command like git request-pull does to get the description of a branch:

C:\Users\VonC\prog\git\git>grep -nRHI description *|grep pull
git-request-pull.sh:45:         ! git config "branch.$branch_name.description" >/dev/null
like image 173
VonC Avatar answered Oct 24 '22 05:10

VonC