Autogenerated man pages for v1.2.4-g5a1f
[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 \- Create a new branch, or remove an old one
23 .SH "SYNOPSIS"
24
25 .nf
26 \fIgit\-branch\fR [[\-f] <branchname> [<start\-point>]]
27 \fIgit\-branch\fR (\-d | \-D) <branchname>
28 .fi
29
30 .SH "DESCRIPTION"
31
32
33 If no argument is provided, show available branches and mark current branch with star\&. Otherwise, create a new branch of name <branchname>\&. If a starting point is also specified, that will be where the branch is created, otherwise it will be created at the current HEAD\&.
34
35
36 With a \-d or \-D option, <branchname> will be deleted\&.
37
38 .SH "OPTIONS"
39
40 .TP
41 \-d
42 Delete a branch\&. The branch must be fully merged\&.
43
44 .TP
45 \-D
46 Delete a branch irrespective of its index status\&.
47
48 .TP
49 \-f
50 Force a reset of <branchname> to <start\-point> (or current head)\&.
51
52 .TP
53 <branchname>
54 The name of the branch to create or delete\&.
55
56 .TP
57 <start\-point>
58 Where to create the branch; defaults to HEAD\&. This option has no meaning with \-d and \-D\&.
59
60 .SS "Examples"
61
62 .TP
63 Start development off of a known tag
64
65 .nf
66 $ git clone git://git\&.kernel\&.org/pub/scm/\&.\&.\&./linux\-2\&.6 my2\&.6
67 $ cd my2\&.6
68 $ git branch my2\&.6\&.14 v2\&.6\&.14 
69 $ git checkout my2\&.6\&.14
70
71  These two steps are the same as "checkout \-b my2\&.6\&.14 v2\&.6\&.14"\&.
72 .fi
73
74 .TP
75 Delete unneeded branch
76
77 .nf
78 $ git clone git://git\&.kernel\&.org/\&.\&.\&./git\&.git my\&.git
79 $ cd my\&.git
80 $ git branch \-D todo 
81
82  delete todo branch even if the "master" branch does not have all
83 commits from todo branch\&.
84 .fi
85
86 .SH "AUTHOR"
87
88
89 Written by Linus Torvalds <torvalds@osdl\&.org> and Junio C Hamano <junkio@cox\&.net>
90
91 .SH "DOCUMENTATION"
92
93
94 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
95
96 .SH "GIT"
97
98
99 Part of the \fBgit\fR(7) suite
100