6 git-show-branch - Show branches and their commits.
11 git-show-branch [--all] [--heads] [--tags] [--topo-order] [--current]
12 [--more=<n> | --list | --independent | --merge-base]
13 [--no-name | --sha1-name] [<rev> | <glob>]...
18 Shows the commit ancestry graph starting from the commits named
19 with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads
20 and/or $GIT_DIR/refs/tags) semi-visually.
22 It cannot show more than 29 branches and commits at a time.
24 It uses `showbranch.default` multi-valued configuration items if
25 no <rev> nor <glob> is given on the command line.
31 Arbitrary extended SHA1 expression (see `git-rev-parse`)
32 that typically names a branch HEAD or a tag.
35 A glob pattern that matches branch or tag names under
36 $GIT_DIR/refs. For example, if you have many topic
37 branches under $GIT_DIR/refs/heads/topic, giving
38 `topic/*` would show all of them.
40 --all --heads --tags::
41 Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads,
42 and $GIT_DIR/refs/tags, respectively.
45 With this option, the command includes the current
46 branch to the list of revs to be shown when it is not
47 given on the command line.
50 By default, the branches and their commits are shown in
51 reverse chronological order. This option makes them
52 appear in topological order (i.e., descendant commits
53 are shown before their parents).
56 Usually the command stops output upon showing the commit
57 that is the common ancestor of all the branches. This
58 flag tells the command to go <n> more common commits
59 beyond that. When <n> is negative, display only the
60 <reference>s given, without showing the commit ancestry
64 Synonym to `--more=-1`
67 Instead of showing the commit list, just act like the
68 'git-merge-base -a' command, except that it can accept
72 Among the <reference>s given, display only the ones that
73 cannot be reached from any other <reference>.
76 Do not show naming strings for each commit.
79 Instead of naming the commits using the path to reach
80 them from heads (e.g. "master~2" to mean the grandparent
81 of "master"), name them with the unique prefix of their
84 Note that --more, --list, --independent and --merge-base options
85 are mutually exclusive.
90 Given N <references>, the first N lines are the one-line
91 description from their commit message. The branch head that is
92 pointed at by $GIT_DIR/HEAD is prefixed with an asterisk `*`
93 character while other heads are prefixed with a `!` character.
95 Following these N lines, one-line log for each commit is
96 displayed, indented N places. If a commit is on the I-th
97 branch, the I-th indentation character shows a `+` sign;
98 otherwise it shows a space. Merge commits are denoted by
99 a `-` sign. Each commit shows a short name that
100 can be used as an extended SHA1 to name that commit.
102 The following example shows three branches, "master", "fixes"
105 ------------------------------------------------
106 $ git show-branch master fixes mhf
107 * [master] Add 'git show-branch'.
108 ! [fixes] Introduce "reset type" flag to "git reset"
109 ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
111 + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
112 + [mhf~1] Use git-octopus when pulling more than one heads.
113 + [fixes] Introduce "reset type" flag to "git reset"
114 + [mhf~2] "git fetch --force".
115 + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
116 + [mhf~4] Make "git pull" and "git fetch" default to origin
117 + [mhf~5] Infamous 'octopus merge'
118 + [mhf~6] Retire git-parse-remote.
119 + [mhf~7] Multi-head fetch.
120 + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
121 *++ [master] Add 'git show-branch'.
122 ------------------------------------------------
124 These three branches all forked from a common commit, [master],
125 whose commit message is "Add 'git show-branch'. "fixes" branch
126 adds one commit 'Introduce "reset type"'. "mhf" branch has many
127 other commits. The current branch is "master".
133 If you keep your primary branches immediately under
134 `$GIT_DIR/refs/heads`, and topic branches in subdirectories of
135 it, having the following in the configuration file may help:
139 default = --topo-order
144 With this,`git show-branch` without extra parameters would show
145 only the primary branches. In addition, if you happen to be on
146 your topic branch, it is shown as well.
152 Written by Junio C Hamano <junkio@cox.net>
157 Documentation by Junio C Hamano.
162 Part of the gitlink:git[7] suite