Autogenerated man pages for v1.4.0-rc1-gfd7e
[git.git] / man1 / git-branch.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-BRANCH" 1 "" "" ""
21 .SH NAME
22 git-branch \- List, create, or delete branches.
23 .SH "SYNOPSIS"
24
25 .nf
26 \fIgit\-branch\fR [\-r]
27 \fIgit\-branch\fR [\-l] [\-f] <branchname> [<start\-point>]
28 \fIgit\-branch\fR (\-d | \-D) <branchname>...
29 .fi
30
31 .SH "DESCRIPTION"
32
33
34 With no arguments given (or just \-r) a list of available branches will be shown, the current branch will be highlighted with an asterisk\&.
35
36
37 In its second form, a new branch named <branchname> will be created\&. It will start out with a head equal to the one given as <start\-point>\&. If no <start\-point> is given, the branch will be created with a head equal to that of the currently checked out branch\&.
38
39
40 With a \-d or \-D option, <branchname> will be deleted\&. You may specify more than one branch for deletion\&. If the branch currently has a ref log then the ref log will also be deleted\&.
41
42 .SH "OPTIONS"
43
44 .TP
45 \-d
46 Delete a branch\&. The branch must be fully merged\&.
47
48 .TP
49 \-D
50 Delete a branch irrespective of its index status\&.
51
52 .TP
53 \-l
54 Create the branch's ref log\&. This activates recording of all changes to made the branch ref, enabling use of date
55
56 .TP
57 \-f
58 Force the creation of a new branch even if it means deleting a branch that already exists with the same name\&.
59
60 .TP
61 \-r
62 List only the "remote" branches\&.
63
64 .TP
65 <branchname>
66 The name of the branch to create or delete\&. The new branch name must pass all checks defined by \fBgit\-check\-ref\-format\fR(1)\&. Some of these checks may restrict the characters allowed in a branch name\&.
67
68 .TP
69 <start\-point>
70 The new branch will be created with a HEAD equal to this\&. It may be given as a branch name, a commit\-id, or a tag\&. If this option is omitted, the current branch is assumed\&.
71
72 .SH "EXAMPLES"
73
74 .TP
75 Start development off of a known tag
76
77 .nf
78 $ git clone git://git\&.kernel\&.org/pub/scm/\&.\&.\&./linux\-2\&.6 my2\&.6
79 $ cd my2\&.6
80 $ git branch my2\&.6\&.14 v2\&.6\&.14   \fB(1)\fR
81 $ git checkout my2\&.6\&.14
82 .fi
83 .sp
84 \fB1. \fRThis step and the next one could be combined into a single step with "checkout \-b my2\&.6\&.14 v2\&.6\&.14"\&.
85 .br
86
87
88 .TP
89 Delete unneeded branch
90
91 .nf
92 $ git clone git://git\&.kernel\&.org/\&.\&.\&./git\&.git my\&.git
93 $ cd my\&.git
94 $ git branch \-D todo    \fB(1)\fR
95 .fi
96 .sp
97 \fB1. \fRdelete todo branch even if the "master" branch does not have all commits from todo branch\&.
98 .br
99
100
101 .SH "NOTES"
102
103
104 If you are creating a branch that you want to immediately checkout, it's easier to use the git checkout command with its \-b option to create a branch and check it out with a single command\&.
105
106 .SH "AUTHOR"
107
108
109 Written by Linus Torvalds <torvalds@osdl\&.org> and Junio C Hamano <junkio@cox\&.net>
110
111 .SH "DOCUMENTATION"
112
113
114 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
115
116 .SH "GIT"
117
118
119 Part of the \fBgit\fR(7) suite
120