Documentation / git-show-branch.txton commit Accumulated documentation updates. (f85a419)
   1git-show-branch(1)
   2==================
   3v0.99.5, Aug 2005
   4
   5NAME
   6----
   7git-show-branch - Show branches and their commits.
   8
   9SYNOPSIS
  10--------
  11'git show-branch [--all] [--heads] [--tags] [--more=<n>] [--merge-base] <reference>...'
  12
  13DESCRIPTION
  14-----------
  15Shows the head commits from the named <reference> (or all refs under
  16$GIT_DIR/refs/heads), and displays concise list of commit logs
  17to show their relationship semi-visually.
  18
  19OPTIONS
  20-------
  21<reference>::
  22        Name of the reference under $GIT_DIR/refs/.
  23
  24--all --heads --tags::
  25        Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads,
  26        and $GIT_DIR/refs/tags, respectively.
  27
  28--more=<n>::
  29        Usually the command stops output upon showing the commit
  30        that is the common ancestor of all the branches.  This
  31        flag tells the command to go <n> more common commits
  32        beyond that.
  33
  34--merge-base::
  35        Instead of showing the commit list, just act like the
  36        'git-merge-base' command except that it can accept more
  37        than two heads.
  38
  39
  40OUTPUT
  41------
  42Given N <references>, the first N lines are the one-line
  43description from their commit message.  The branch head that is
  44pointed at by $GIT_DIR/HEAD is prefixed with an asterisk '*'
  45character while other heads are prefixed with a '!' character.
  46
  47Following these N lines, one-line log for each commit is
  48displayed, indented N places.  If a commit is on the I-th
  49branch, the I-th indentation character shows a '+' sign;
  50otherwise it shows a space.  Each commit shows a short name that
  51can be used as an exended SHA1 to name that commit.
  52
  53The following example shows three branches, "master", "fixes"
  54and "mhf":
  55
  56------------------------------------------------
  57$ git show-branch master fixes mhf
  58! [master] Add 'git show-branch'.
  59 ! [fixes] Introduce "reset type" flag to "git reset"
  60  ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
  61---
  62  + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
  63  + [mhf~1] Use git-octopus when pulling more than one heads.
  64 +  [fixes] Introduce "reset type" flag to "git reset"
  65  + [mhf~2] "git fetch --force".
  66  + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
  67  + [mhf~4] Make "git pull" and "git fetch" default to origin
  68  + [mhf~5] Infamous 'octopus merge'
  69  + [mhf~6] Retire git-parse-remote.
  70  + [mhf~7] Multi-head fetch.
  71  + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
  72+++ [master] Add 'git show-branch'.
  73------------------------------------------------
  74
  75These three branches all forked from a common commit, [master],
  76whose commit message is "Add 'git show-branch'.  "fixes" branch
  77adds one commit 'Introduce "reset type"'.  "mhf" branch has many
  78other commits.
  79
  80When only one head is given, the output format changes slightly
  81to conserve space.  The '+' sign to show which commit is
  82reachable from which head and the first N lines to show the list
  83of heads being displayed are both meaningless so they are
  84omitted.  Also the label given to each commit does not repeat
  85the name of the branch because it is obvious.
  86
  87------------------------------------------------
  88$ git show-branch --more=4 master
  89[master] Add 'git show-branch'.
  90[~1] Add a new extended SHA1 syntax <name>~<num>
  91[~2] Fix "git-diff-script A B"
  92[~3] git-ls-files: generalized pathspecs
  93[~4] Make "git-ls-files" work in subdirectories
  94------------------------------------------------
  95
  96Author
  97------
  98Written by Junio C Hamano <junkio@cox.net>
  99
 100
 101Documentation
 102--------------
 103Documentation by Junio C Hamano.
 104
 105
 106GIT
 107---
 108Part of the link:git.html[git] suite