git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mark Levedahl <mlevedahl@gmail.com>, git@vger.kernel.org
Subject: [PATCH 4/5] doc/checkout: split checkout and branch creation in synopsis
Date: Mon, 13 Apr 2009 07:19:33 -0400	[thread overview]
Message-ID: <20090413111933.GD15982@coredump.intra.peff.net> (raw)
In-Reply-To: <20090413110947.GA15647@coredump.intra.peff.net>

These can really be thought of as two different modes, since
the "<branch>" parameter is treated differently in the two
(in one it is the branch to be checked out, but in the other
it is really a start-point for branch creation).

Signed-off-by: Jeff King <peff@peff.net>
---
This was the actual goal of the series. :)

 Documentation/git-checkout.txt |   40 ++++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 22ad10d..4a1fb53 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -8,23 +8,22 @@ git-checkout - Checkout a branch or paths to the working tree
 SYNOPSIS
 --------
 [verse]
-'git checkout' [-q] [-f] [-m] [-b <new_branch>] [<branch>]
+'git checkout' [-q] [-f] [-m] [<branch>]
+'git checkout' [-q] [-f] [-m] [-b <new_branch>] [<start_point>]
 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
 
 DESCRIPTION
 -----------
 
 When <paths> are not given, this command switches branches by
-updating the index and working tree to reflect the specified
-branch, <branch>, and updating HEAD to be <branch> or, if
-specified, <new_branch>.  Using -b will cause <new_branch> to
-be created as if linkgit:git-branch[1] were called; in this case you can
-use the --track or --no-track options, which will be passed to `git
-branch`.
+updating the index, working tree, and HEAD to reflect the specified
+branch.
 
-As a convenience, --track will default to creating a branch whose
-name is constructed from the specified branch name by stripping
-the first namespace level.
+If `-b` is given, a new branch is created and checked out, as if
+linkgit:git-branch[1] were called; in this case you can
+use the --track or --no-track options, which will be passed to `git
+branch`.  As a convenience, --track without `-b` implies branch
+creation; see the description of --track below.
 
 When <paths> are given, this command does *not* switch
 branches.  It updates the named paths in the working tree from
@@ -63,7 +62,7 @@ entries; instead, unmerged entries are ignored.
 
 -b::
 	Create a new branch named <new_branch> and start it at
-	<branch>; see linkgit:git-branch[1] for details.
+	<start_point>; see linkgit:git-branch[1] for details.
 
 -t::
 --track::
@@ -114,13 +113,6 @@ the conflicted merge in the specified paths.
 	"merge" (default) and "diff3" (in addition to what is shown by
 	"merge" style, shows the original contents).
 
-<new_branch>::
-	Name for the new branch.
-
-<tree-ish>::
-	Tree to checkout from (when paths are given). If not specified,
-	the index will be used.
-
 <branch>::
 	Branch to checkout (when no paths are given); may be any object
 	ID that resolves to a commit.  Defaults to HEAD.
@@ -132,6 +124,18 @@ As a special case, the `"@\{-N\}"` syntax for the N-th last branch
 checks out the branch (instead of detaching).  You may also specify
 `-` which is synonymous with `"@\{-1\}"`.
 
+<new_branch>::
+	Name for the new branch.
+
+<start_point>::
+	The name of a commit at which to start the new branch; see
+	linkgit:git-branch[1] for details. Defaults to HEAD.
+
+<tree-ish>::
+	Tree to checkout from (when paths are given). If not specified,
+	the index will be used.
+
+
 
 Detached HEAD
 -------------
-- 
1.6.3.rc0.148.g141203.dirty

  parent reply	other threads:[~2009-04-13 11:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10  0:28 [PATCH] builtin-branch - allow deleting a fully specified branch-name Mark Levedahl
2009-04-10  0:39 ` Junio C Hamano
2009-04-10  1:19   ` Mark Levedahl
2009-04-10  3:18     ` Junio C Hamano
2009-04-11 17:01       ` Mark Levedahl
2009-04-12  7:20         ` Jeff King
2009-04-12  8:22           ` Junio C Hamano
2009-04-13  8:56             ` Jeff King
2009-04-13  9:54               ` Junio C Hamano
2009-04-13 11:09                 ` Jeff King
2009-04-13 11:11                   ` [PATCH 1/5] doc: clarify --no-track option Jeff King
2009-04-13 11:11                   ` [PATCH 2/5] doc: refer to tracking configuration as "upstream" Jeff King
2009-04-13 11:18                   ` [PATCH 3/5] doc/checkout: refer to git-branch(1) as appropriate Jeff King
2009-04-13 11:19                   ` Jeff King [this message]
     [not found]                     ` <fabb9a1e0904130613g5b664706jb6a3c29107ac1fc9@mail.gmail.com>
2009-04-13 13:19                       ` [PATCH 4/5] doc/checkout: split checkout and branch creation in synopsis Jeff King
2009-04-13 13:21                         ` Sverre Rabbelier
2009-04-13 11:21                   ` [PATCH 5/5] docs/checkout: clarify what "non-branch" means Jeff King
2009-04-13 16:31                     ` Junio C Hamano
2009-04-14  3:40                       ` Mark Levedahl
2009-04-14  4:20                         ` Junio C Hamano
2009-04-14 11:36                         ` Jakub Narebski
2009-04-15 18:00                           ` Jeff King
2009-04-15 17:58                       ` Jeff King
2009-04-13 10:57               ` [PATCH] builtin-branch - allow deleting a fully specified branch-name Jeff King

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=20090413111933.GD15982@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mlevedahl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).