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