summaryrefslogtreecommitdiffstats
path: root/git-branch.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2006-04-29 07:02:01 +0000
committerJunio C Hamano <junio@hera.kernel.org>2006-04-29 07:02:01 +0000
commitc8d88c2181b2e1675c5057ec9446be2f6f7529b3 (patch)
treeff8704aff72f29d72cb8f8ddcf9b9066cbb54478 /git-branch.html
parent6de0ecdcce3d89e64a763ff208d44a8e65e5b332 (diff)
downloadgit-htmldocs-c8d88c2181b2e1675c5057ec9446be2f6f7529b3.tar.gz
Autogenerated HTML docs for v1.3.1-g8971
Diffstat (limited to 'git-branch.html')
-rw-r--r--git-branch.html75
1 files changed, 54 insertions, 21 deletions
diff --git a/git-branch.html b/git-branch.html
index dcf5da7bf..ad5596a11 100644
--- a/git-branch.html
+++ b/git-branch.html
@@ -266,23 +266,27 @@ git-branch(1) Manual Page
<h2>NAME</h2>
<div class="sectionbody">
<p>git-branch -
- Create a new branch, or remove an old one
+ List, create, or delete branches.
</p>
</div>
</div>
<h2>SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<div class="content"><em>git-branch</em> [[-f] &lt;branchname&gt; [&lt;start-point&gt;]]
-<em>git-branch</em> (-d | -D) &lt;branchname&gt;</div></div>
+<div class="content"><em>git-branch</em> [-r]
+<em>git-branch</em> [-f] &lt;branchname&gt; [&lt;start-point&gt;]
+<em>git-branch</em> (-d | -D) &lt;branchname&gt;&#8230;</div></div>
</div>
<h2>DESCRIPTION</h2>
<div class="sectionbody">
-<p>If no argument is provided, show available branches and mark current
-branch with star. Otherwise, create a new branch of name &lt;branchname&gt;.
-If a starting point is also specified, that will be where the branch is
-created, otherwise it will be created at the current HEAD.</p>
-<p>With a <tt>-d</tt> or <tt>-D</tt> option, <tt>&lt;branchname&gt;</tt> will be deleted.</p>
+<p>With no arguments given (or just <tt>-r</tt>) a list of available branches
+will be shown, the current branch will be highlighted with an asterisk.</p>
+<p>In its second form, a new branch named &lt;branchname&gt; will be created.
+It will start out with a head equal to the one given as &lt;start-point&gt;.
+If no &lt;start-point&gt; is given, the branch will be created with a head
+equal to that of the currently checked out branch.</p>
+<p>With a <tt>-d</tt> or <tt>-D</tt> option, <tt>&lt;branchname&gt;</tt> will be deleted. You may
+specify more than one branch for deletion.</p>
</div>
<h2>OPTIONS</h2>
<div class="sectionbody">
@@ -308,7 +312,16 @@ created, otherwise it will be created at the current HEAD.</p>
</dt>
<dd>
<p>
- Force a reset of &lt;branchname&gt; to &lt;start-point&gt; (or current head).
+ Force the creation of a new branch even if it means deleting
+ a branch that already exists with the same name.
+</p>
+</dd>
+<dt>
+-r
+</dt>
+<dd>
+<p>
+ List only the "remote" branches.
</p>
</dd>
<dt>
@@ -324,12 +337,15 @@ created, otherwise it will be created at the current HEAD.</p>
</dt>
<dd>
<p>
- Where to create the branch; defaults to HEAD. This
- option has no meaning with -d and -D.
+ 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.
</p>
</dd>
</dl>
-<h3>Examples</h3>
+</div>
+<h2>Examples</h2>
+<div class="sectionbody">
<dl>
<dt>
Start development off of a known tag
@@ -339,11 +355,17 @@ Start development off of a known tag
<div class="content">
<pre><tt>$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
$ cd my2.6
-$ git branch my2.6.14 v2.6.14 <b>(1)</b>
-$ git checkout my2.6.14
-
-<b>(1)</b> These two steps are the same as "checkout -b my2.6.14 v2.6.14".</tt></pre>
+$ git branch my2.6.14 v2.6.14 <b>(1)</b>
+$ git checkout my2.6.14</tt></pre>
</div></div>
+<ol>
+<li>
+<p>
+This step and the next one could be combined into a single step with
+"checkout -b my2.6.14 v2.6.14".
+</p>
+</li>
+</ol>
</dd>
<dt>
Delete unneeded branch
@@ -353,14 +375,25 @@ Delete unneeded branch
<div class="content">
<pre><tt>$ git clone git://git.kernel.org/.../git.git my.git
$ cd my.git
-$ git branch -D todo <b>(1)</b>
-
-<b>(1)</b> delete todo branch even if the "master" branch does not have all
-commits from todo branch.</tt></pre>
+$ git branch -D todo <b>(1)</b></tt></pre>
</div></div>
+<ol>
+<li>
+<p>
+delete todo branch even if the "master" branch does not have all
+commits from todo branch.
+</p>
+</li>
+</ol>
</dd>
</dl>
</div>
+<h2>Notes</h2>
+<div class="sectionbody">
+<p>If you are creating a branch that you want to immediately checkout, it's
+easier to use the git checkout command with its <tt>-b</tt> option to create
+a branch and check it out with a single command.</p>
+</div>
<h2>Author</h2>
<div class="sectionbody">
<p>Written by Linus Torvalds &lt;torvalds@osdl.org&gt; and Junio C Hamano &lt;junkio@cox.net&gt;</p>
@@ -375,7 +408,7 @@ commits from todo branch.</tt></pre>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 18-Mar-2006 07:45:34 UTC
+Last updated 29-Apr-2006 07:01:32 UTC
</div>
</div>
</body>