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