git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] git-checkout.txt: clarify that <branch> applies when no path is given.

From
Mike Ralphson <mike.ralphson@gmail.com>
Date
Apr 7, 2009, 09:41 UTC
Message-ID
<e2b179460904070241y493ef876xc628d35b606e4032@mail.gmail.com>
In-Reply-To
<1239050722-1227-2-git-send-email-Matthieu.Moy@imag.fr>
2009/4/6 Matthieu Moy <Matthieu.Moy@imag.fr>:
> Otherwise, the sentence "Defaults to HEAD." can be mis-read to mean
> that "git checkout -- hello.c" checks-out from HEAD.
Show 18 quoted lines
> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
> index 0b5485b..58bf508 100644
> --- a/Documentation/git-checkout.txt
> +++ b/Documentation/git-checkout.txt
> @@ -126,9 +126,14 @@ the conflicted merge in the specified paths.
>  <new_branch>::
>        Name for the new branch.
>
> +<tree-ish>::
> +       Tree to checkout from (when path are given). If not specified,
> +       the index will be used.
> +
>  <branch>::
> -       Branch to checkout; may be any object ID that resolves to a
> -       commit.  Defaults to HEAD.
> +       Branch to checkout (when no path are given); may be any object
> +       ID that resolves to a commit.  Defaults to HEAD.
> +
s/path are/paths are/g

Sorry if I come across as picking on your grammar, I think your documentation improvements are very worthwhile.

Mike
Previous: Matthieu MoyNext: Matthieu Moy
Message 3 of 6 in “git-checkout.txt: fix incorrect statement about HEAD and index”
  1. 1/2 git-checkout.txt: fix incorrect statement about HEAD and indexMatthieu Moy, Apr 6, 2009
  2. 2/2 git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy, Apr 6, 2009
  3. Mike RalphsonApr 7, 2009
  4. 1/2 git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy, Apr 7, 2009
  5. git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy, Apr 7, 2009
  6. Junio C HamanoApr 7, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.