Autogenerated man pages for v1.3.1-g8971
[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 [\-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\&.
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 \-f
54 Force the creation of a new branch even if it means deleting a branch that already exists with the same name\&.
55
56 .TP
57 \-r
58 List only the "remote" branches\&.
59
60 .TP
61 <branchname>
62 The name of the branch to create or delete\&.
63
64 .TP
65 <start\-point>
66 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\&.
67
68 .SH "EXAMPLES"
69
70 .TP
71 Start development off of a known tag
72
73 .nf
74 $ git clone git://git\&.kernel\&.org/pub/scm/\&.\&.\&./linux\-2\&.6 my2\&.6
75 $ cd my2\&.6
76 $ git branch my2\&.6\&.14 v2\&.6\&.14   \fB(1)\fR
77 $ git checkout my2\&.6\&.14
78 .fi
79 .sp
80 \fB1. \fRThis step and the next one could be combined into a single step with "checkout \-b my2\&.6\&.14 v2\&.6\&.14"\&.
81 .br
82
83
84 .TP
85 Delete unneeded branch
86
87 .nf
88 $ git clone git://git\&.kernel\&.org/\&.\&.\&./git\&.git my\&.git
89 $ cd my\&.git
90 $ git branch \-D todo    \fB(1)\fR
91 .fi
92 .sp
93 \fB1. \fRdelete todo branch even if the "master" branch does not have all commits from todo branch\&.
94 .br
95
96
97 .SH "NOTES"
98
99
100 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\&.
101
102 .SH "AUTHOR"
103
104
105 Written by Linus Torvalds <torvalds@osdl\&.org> and Junio C Hamano <junkio@cox\&.net>
106
107 .SH "DOCUMENTATION"
108
109
110 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
111
112 .SH "GIT"
113
114
115 Part of the \fBgit\fR(7) suite
116