304101d818056cb6624d44218122216d8fe517d8
1 git-show-branch(1)
2 ==================
4 NAME
5 ----
6 git-show-branch - Show branches and their commits.
8 SYNOPSIS
9 --------
10 'git-show-branch [--all] [--heads] [--tags] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [<rev> | <glob>]...'
12 DESCRIPTION
13 -----------
15 Shows the commit ancestry graph starting from the commits named
16 with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads
17 and/or $GIT_DIR/refs/tags) semi-visually.
19 It cannot show more than 29 branches and commits at a time.
22 OPTIONS
23 -------
24 <rev>::
25 Arbitrary extended SHA1 expression (see `git-rev-parse`)
26 that typically names a branch HEAD or a tag.
28 <glob>::
29 A glob pattern that matches branch or tag names under
30 $GIT_DIR/refs. For example, if you have many topic
31 branches under $GIT_DIR/refs/heads/topic, giving
32 `topic/*` would show all of them.
34 --all --heads --tags::
35 Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads,
36 and $GIT_DIR/refs/tags, respectively.
38 --more=<n>::
39 Usually the command stops output upon showing the commit
40 that is the common ancestor of all the branches. This
41 flag tells the command to go <n> more common commits
42 beyond that. When <n> is negative, display only the
43 <reference>s given, without showing the commit ancestry
44 tree.
46 --list::
47 Synomym to `--more=-1`
49 --merge-base::
50 Instead of showing the commit list, just act like the
51 'git-merge-base -a' command, except that it can accept
52 more than two heads.
54 --independent::
55 Among the <reference>s given, display only the ones that
56 cannot be reached from any other <reference>.
58 --no-name::
59 Do not show naming strings for each commit.
61 --sha1-name::
62 Instead of naming the commits using the path to reach
63 them from heads (e.g. "master~2" to mean the grandparent
64 of "master"), name them with the unique prefix of their
65 object names.
67 Note that --more, --list, --independent and --merge-base options
68 are mutually exclusive.
71 OUTPUT
72 ------
73 Given N <references>, the first N lines are the one-line
74 description from their commit message. The branch head that is
75 pointed at by $GIT_DIR/HEAD is prefixed with an asterisk '*'
76 character while other heads are prefixed with a '!' character.
78 Following these N lines, one-line log for each commit is
79 displayed, indented N places. If a commit is on the I-th
80 branch, the I-th indentation character shows a '+' sign;
81 otherwise it shows a space. Each commit shows a short name that
82 can be used as an exended SHA1 to name that commit.
84 The following example shows three branches, "master", "fixes"
85 and "mhf":
87 ------------------------------------------------
88 $ git show-branch master fixes mhf
89 ! [master] Add 'git show-branch'.
90 ! [fixes] Introduce "reset type" flag to "git reset"
91 ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
92 ---
93 + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
94 + [mhf~1] Use git-octopus when pulling more than one heads.
95 + [fixes] Introduce "reset type" flag to "git reset"
96 + [mhf~2] "git fetch --force".
97 + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
98 + [mhf~4] Make "git pull" and "git fetch" default to origin
99 + [mhf~5] Infamous 'octopus merge'
100 + [mhf~6] Retire git-parse-remote.
101 + [mhf~7] Multi-head fetch.
102 + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
103 +++ [master] Add 'git show-branch'.
104 ------------------------------------------------
106 These three branches all forked from a common commit, [master],
107 whose commit message is "Add 'git show-branch'. "fixes" branch
108 adds one commit 'Introduce "reset type"'. "mhf" branch has many
109 other commits.
112 Author
113 ------
114 Written by Junio C Hamano <junkio@cox.net>
117 Documentation
118 --------------
119 Documentation by Junio C Hamano.
122 GIT
123 ---
124 Part of the gitlink:git[7] suite