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