071f65647099fa80dec619066a71033fb9611a65
[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 git\-branch [\-d | \-D] [<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 <branchname>
48 The name of the branch to create or delete\&.
49
50 .TP
51 start\-point
52 Where to create the branch; defaults to HEAD\&. This option has no meaning with \-d and \-D\&.
53
54 .SS "Examples"
55
56 .TP
57 Start development off of a know tag
58
59 .IP
60 $ git clone git://git\&.kernel\&.org/pub/scm/\&.\&.\&./linux\-2\&.6 my2\&.6
61 $ cd my2\&.6
62 $ git branch my2\&.6\&.14 v2\&.6\&.14 
63 $ git checkout my2\&.6\&.14
64
65  These two steps are the same as "checkout \-b my2\&.6\&.14 v2\&.6\&.14"\&.
66 .TP
67 Delete unneeded branch
68
69 .IP
70 $ git clone git://git\&.kernel\&.org/\&.\&.\&./git\&.git my\&.git
71 $ cd my\&.git
72 $ git branch \-D todo 
73
74  delete todo branch even if the "master" branch does not have all
75 commits from todo branch\&.
76 .SH "AUTHOR"
77
78
79 Written by Linus Torvalds <torvalds@osdl\&.org> and Junio C Hamano <junkio@cox\&.net>
80
81 .SH "DOCUMENTATION"
82
83
84 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
85
86 .SH "GIT"
87
88
89 Part of the \fBgit\fR(7) suite
90