public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail•com>
To: git@vger•kernel.org
Subject: [PATCH 7/9] Documentation: clarify branch creation
Date: Fri, 9 Oct 2009 05:19:40 -0500	[thread overview]
Message-ID: <20091009101940.GG16558@progeny.tock> (raw)
In-Reply-To: <20091009101400.GA16549@progeny.tock>

The documentation seems to assume that the starting point for a new
branch is the tip of an existing (ordinary) branch, but that is not
the most common case.  More often, "git branch" is used to begin
a branch from a remote-tracking branch, a tag, or an interesting
commit (e.g. origin/pu^2).  Clarify the language so it can apply
to these cases.

Signed-off-by: Jonathan Nieder <jrnieder@gmail•com>
---
 Documentation/git-branch.txt |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index e8b32a2..990f782 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -30,10 +30,11 @@ commit) will be listed.  With `--no-merged` only branches not merged into
 the named commit will be listed.  If the <commit> argument is missing it
 defaults to 'HEAD' (i.e. the tip of the current branch).
 
-In the command's second form, a new branch named <branchname> will be created.
-It will start out with a head equal to the one given as <start-point>.
-If no <start-point> is given, the branch will be created with a head
-equal to that of the currently checked out branch.
+In the command's second form, creates a new branch named <branchname>.
+The branch will start out with head pointing to the commit
+<start-point>.  If no <start-point> is given, the branch will start
+out with head pointing to the tip of the currently checked out branch,
+or the currently checked out commit if no branch is checked out.
 
 Note that this will create the new branch, but it will not switch the
 working tree to it; use "git checkout <newbranch>" to switch to the
@@ -149,9 +150,11 @@ start-point is either a local or remote branch.
 	may restrict the characters allowed in a branch name.
 
 <start-point>::
-	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.
+	The new branch head will point to this commit.  It may be
+	given as a branch name, a commit-id, or a tag.  If this
+	option is omitted, the currently checked out branch head
+	is used, or the current commit if no branch is checked
+	out.
 
 <oldbranch>::
 	The name of an existing branch to rename.
-- 
1.6.5.rc1.199.g596ec

  parent reply	other threads:[~2009-10-09 10:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 10:14 [PATCH 0/9] Documentation tweaks Jonathan Nieder
2009-10-09 10:15 ` [PATCH 1/9] Describe DOCBOOK_XSL_172, ASCIIDOC_NO_ROFF options in Makefile Jonathan Nieder
2009-10-09 10:16 ` [PATCH 2/9] Documentation: git fmt-merge-message is not a script Jonathan Nieder
2009-10-09 10:16 ` [PATCH 3/9] Documentation: fix singular/plural mismatch Jonathan Nieder
2009-10-09 10:17 ` [PATCH 4/9] Documentation: say "the same" instead of "equal" Jonathan Nieder
2009-10-09 18:51   ` [PATCH 3-4/9 v2] Documentation: clarify mergeoptions description Jonathan Nieder
2009-10-09 10:18 ` [PATCH 5/9] Documentation: clone: clarify discussion of initial branch Jonathan Nieder
2009-10-09 21:48   ` Junio C Hamano
2009-10-09 23:07     ` [PATCH 5/9 v2] " Jonathan Nieder
2009-10-09 10:18 ` [PATCH 6/9] Documentation: branch: update --merged description Jonathan Nieder
2009-10-10  0:56   ` Junio C Hamano
2009-10-09 10:19 ` Jonathan Nieder [this message]
2009-10-09 16:21   ` [PATCH 7/9] Documentation: clarify branch creation Sean Estabrooks
2009-10-09 18:34     ` Jonathan Nieder
2009-10-10  0:57       ` Junio C Hamano
2009-10-09 10:20 ` [PATCH 8/9] Documentation: clarify "working tree" definition Jonathan Nieder
2009-10-09 10:25 ` [PATCH 9/9] racy-git.txt: explain nsec problem in more detail Jonathan Nieder
2009-10-10  0:56   ` Junio C Hamano
2009-10-10  0:58 ` [PATCH 0/9] Documentation tweaks Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091009101940.GG16558@progeny.tock \
    --to=jrnieder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox