<h2>NAME</h2>\r
<div class="sectionbody">\r
<p>git-branch -\r
- Create a new branch, or remove an old one\r
+ List, create, or delete branches.\r
</p>\r
</div>\r
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<p><em>git-branch</em> [(-d | -D) <branchname>] | [[-f] <branchname> [<start-point>]]</p>\r
+<div class="verseblock">\r
+<div class="content"><em>git-branch</em> [-r]\r
+<em>git-branch</em> [-l] [-f] <branchname> [<start-point>]\r
+<em>git-branch</em> (-d | -D) <branchname>…</div></div>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
-<p>If no argument is provided, show available branches and mark current\r
-branch with star. Otherwise, create a new branch of name <branchname>.</p>\r
-<p>If a starting point is also specified, that will be where the branch is\r
-created, otherwise it will be created at the current HEAD.</p>\r
+<p>With no arguments given (or just <tt>-r</tt>) a list of available branches\r
+will be shown, the current branch will be highlighted with an asterisk.</p>\r
+<p>In its second form, a new branch named <branchname> will be created.\r
+It will start out with a head equal to the one given as <start-point>.\r
+If no <start-point> is given, the branch will be created with a head\r
+equal to that of the currently checked out branch.</p>\r
+<p>With a <tt>-d</tt> or <tt>-D</tt> option, <tt><branchname></tt> will be deleted. You may\r
+specify more than one branch for deletion. If the branch currently\r
+has a ref log then the ref log will also be deleted.</p>\r
</div>\r
<h2>OPTIONS</h2>\r
<div class="sectionbody">\r
</p>\r
</dd>\r
<dt>\r
+-l\r
+</dt>\r
+<dd>\r
+<p>\r
+ Create the branch's ref log. This activates recording of\r
+ all changes to made the branch ref, enabling use of date\r
+</p>\r
+</dd>\r
+<dt>\r
-f\r
</dt>\r
<dd>\r
<p>\r
- Force a reset of <branchname> to <start-point> (or current head).\r
+ Force the creation of a new branch even if it means deleting\r
+ a branch that already exists with the same name.\r
+</p>\r
+</dd>\r
+<dt>\r
+-r\r
+</dt>\r
+<dd>\r
+<p>\r
+ List only the "remote" branches.\r
</p>\r
</dd>\r
<dt>\r
<dd>\r
<p>\r
The name of the branch to create or delete.\r
+ The new branch name must pass all checks defined by\r
+ <a href="git-check-ref-format.html">git-check-ref-format(1)</a>. Some of these checks\r
+ may restrict the characters allowed in a branch name.\r
</p>\r
</dd>\r
<dt>\r
</dt>\r
<dd>\r
<p>\r
- Where to create the branch; defaults to HEAD. This\r
- option has no meaning with -d and -D.\r
+ The new branch will be created with a HEAD equal to this. It may\r
+ be given as a branch name, a commit-id, or a tag. If this option\r
+ is omitted, the current branch is assumed.\r
</p>\r
</dd>\r
</dl>\r
-<h3>Examples</h3>\r
+</div>\r
+<h2>Examples</h2>\r
+<div class="sectionbody">\r
<dl>\r
<dt>\r
-Start development off of a know tag\r
+Start development off of a known tag\r
</dt>\r
<dd>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6\r
$ cd my2.6\r
-$ git branch my2.6.14 v2.6.14 <b>(1)</b>\r
-$ git checkout my2.6.14\r
-\r
-<b>(1)</b> These two steps are the same as "checkout -b my2.6.14 v2.6.14".</tt></pre>\r
+$ git branch my2.6.14 v2.6.14 <b>(1)</b>\r
+$ git checkout my2.6.14</tt></pre>\r
</div></div>\r
+<ol>\r
+<li>\r
+<p>\r
+This step and the next one could be combined into a single step with\r
+"checkout -b my2.6.14 v2.6.14".\r
+</p>\r
+</li>\r
+</ol>\r
</dd>\r
<dt>\r
Delete unneeded branch\r
<div class="content">\r
<pre><tt>$ git clone git://git.kernel.org/.../git.git my.git\r
$ cd my.git\r
-$ git branch -D todo <b>(1)</b>\r
-\r
-<b>(1)</b> delete todo branch even if the "master" branch does not have all\r
-commits from todo branch.</tt></pre>\r
+$ git branch -D todo <b>(1)</b></tt></pre>\r
</div></div>\r
+<ol>\r
+<li>\r
+<p>\r
+delete todo branch even if the "master" branch does not have all\r
+commits from todo branch.\r
+</p>\r
+</li>\r
+</ol>\r
</dd>\r
</dl>\r
</div>\r
+<h2>Notes</h2>\r
+<div class="sectionbody">\r
+<p>If you are creating a branch that you want to immediately checkout, it's\r
+easier to use the git checkout command with its <tt>-b</tt> option to create\r
+a branch and check it out with a single command.</p>\r
+</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
<p>Written by Linus Torvalds <torvalds@osdl.org> and Junio C Hamano <junkio@cox.net></p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 10-Mar-2006 00:31:21 UTC\r
+Last updated 04-Jun-2006 07:24:21 UTC\r
</div>\r
</div>\r
</body>\r