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

Re: [PATCH] git-checkout.txt: Document "git checkout <pathspec>" better

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2015, 14:47 UTC
Message-ID
<xmqqegligv45.fsf@gitster.dls.corp.google.com>
In-Reply-To
<55788190.80106@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
Show 9 quoted lines
> On 2015-06-10 17.05, Junio C Hamano wrote:
>
>>> -git-checkout - Checkout a branch or paths to the working tree
>>> +git-checkout - Switch branches or reverts changes in the working tree
>> 
>> Two verbs in different moods; either "switch branches or restore
>> changes" or "switches branches or restores changes" would fix that,
>> and judging from "git help" output, I think we want to go with the
>> former, i.e. "switch branches or restore changes".

Gaah, no we do not "restore" changes. We "restore" working tree files to their pristine state.

And "... or restore working tree files to their pristine state" is way too long.

Unfortunately "overwrite changes in the working tree" is even worse. As it does not say overwrite _with what_, we invite the original confusion that triggered this whole thread if the reader thought an equally useful but different "overwrites with result of merging your local changes to the pristine" (similar to what "checkout -m" does) would happen.

At least, "restore working tree files" without saying "restoring them to what state?" is much less likely to cause such a confusion.

So...
    git-checkout - Switch branches or restore working tree files
perhaps?
Previous: Torsten BögershausenNext: Ed Avis
Message 7 of 12 in “git-checkout.txt: Document "git checkout <pathspec>" better”
  1. git-checkout.txt: Document "git checkout <pathspec>" betterTorsten Bögershausen, Jun 8, 2015
  2. Junio C HamanoJun 10, 2015
  3. Ed AvisJun 10, 2015
  4. Junio C HamanoJun 10, 2015
  5. Ed AvisJun 11, 2015
  6. Torsten BögershausenJun 10, 2015
  7. Junio C HamanoJun 11, 2015
  8. Ed AvisJun 11, 2015
  9. Junio C HamanoJun 11, 2015
  10. Scott SchmitJun 12, 2015
  11. Junio C HamanoJun 12, 2015
  12. Torsten BögershausenJun 12, 2015

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.