Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I confirm there is no way for now to display the description of the branch with <code>git branch</code>.</p> <p><a href="http://git.661346.n2.nabble.com/More-support-on-branch-description-td7204093.html" rel="nofollow noreferrer">This thread</a> includes</p> <blockquote> <blockquote> <p>The coming v1.7.9 will introduce branch description, mainly used in integration process. I think we could make it useful for users who don't extensively use request-pull/format-patch. Showing a short summary along with branch name in "<code>git branch</code>" would be nice.</p> </blockquote> <p>I agree that it would be nice to give users access to the information even if the branch ends up being merged to the master branch by you and never leaves your repository by itself.</p> <p>You however are misguided to say "Showing a short summary along...".</p> <p>The branch description support is to give users a place to record detailed explanation about a branch, similar in size to what you would normally place in a log message of a commit or a cover letter of a series.<br> There wasn't any convenient place to do so for a branch that is (1) inherently a moving target while it is being developed and (2) is not a good match for tags and notes.</p> <p>There already is a good place for a brief summary and it is called "branch name". Name your branches just like you name your functions. </p> </blockquote> <p>The suggested patch "<a href="http://thread.gmane.org/gmane.comp.version-control.git/186727" rel="nofollow noreferrer"><code>git branch --verbose-format</code></a>" is not yet completed.</p> <p>So the <a href="https://gist.github.com/pdfr/2658582" rel="nofollow noreferrer">script</a> <a href="https://stackoverflow.com/questions/15058844/print-branch-description#comment21172842_15058844">mentioned</a> by <a href="https://stackoverflow.com/users/216074/poke">poke</a>, remains (with a git alias) the only current solution:</p> <pre><code>#!/bin/perl $output= `git branch`; foreach my $line (split(/^/, $output)) { my ($is_current, $name) = split(/\s+/, $line); my $description = `git config branch.$name.description`; $description =~ s/\s+$//; printf("%1s %-22s %s\n", $is_current, $name, $description); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload