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

Re: How-to revert a locally modified file

From
Wink Saville <wink@saville.com>
Date
Dec 1, 2006, 06:20 UTC
Message-ID
<456FC9C4.5040405@saville.com>
In-Reply-To
<7v4psgduzg.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Wink Saville <wink@saville.com> writes:
> 
> 
> Where did you find 0.99.7 ToDo?  I am curious...
here: http://kerneltrap.org/node/5678
Show 7 quoted lines
> 
>     git-checkout: revert specific paths to either index or a given tree-ish.
>     
>     When extra paths arguments are given, git-checkout reverts only those
>     paths to either the version recorded in the index or the version
>     recorded in the given tree-ish.
>     
FYI the above seems more obvious then what's in the man page:

"It updates the named paths in the working tree from the index file (i.e. it runs git-checkout-index -f -u)."

But for me saying something like;
"It reverts the paths in the working tree to the most recent version stored in git."

would even be better. It may not be as precise as the current sentence, but more obvious to this neophyte. Finally, in the EXAMPLES you might add another example of reverting a "modified the file" as well as recovering a deleted file.

In any case thanks,
Previous: Junio C Hamano
Message 3 of 3 in “How-to revert a locally modified file”
  1. Wink SavilleDec 1, 2006
  2. Junio C HamanoDec 1, 2006
  3. Wink SavilleDec 1, 2006

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.