Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Wink Saville <wink@saville.com>
Cc: git@vger.kernel.org
Subject: Re: How-to revert a locally modified file
Date: Thu, 30 Nov 2006 21:51:31 -0800	[thread overview]
Message-ID: <7v4psgduzg.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <456FBC63.5090609@saville.com> (Wink Saville's message of "Thu, 30 Nov 2006 21:23:47 -0800")

Wink Saville <wink@saville.com> writes:

> Hello,
>
> I searched the net and couldn't find the answer to how to revert a
> file to its "pre-modified" state.
>
> I did see in the 0.99.7 To Do:

Where did you find 0.99.7 ToDo?  I am curious...

> * Perhaps a tool to revert a single file to pre-modification
> state? git-cat-file blob `git-ls-files | grep foo` >foo or
> git-cat-file blob `git-ls-tree HEAD foo` >foo? What should
> the command be called? git-revert is taken so is
> git-checkout.
>
> Did such a command come to be?

commit 4aaa702794447d9b281dd22fe532fd61e02434e1
Author: Junio C Hamano <junkio@cox.net>
Date:   Tue Oct 18 01:29:27 2005 -0700

    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.
    
    This has been on the TODO list for quite a while.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>

See the EXAMPLES section of git-checkout manual page.

  reply	other threads:[~2006-12-01  5:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01  5:23 How-to revert a locally modified file Wink Saville
2006-12-01  5:51 ` Junio C Hamano [this message]
2006-12-01  6:20   ` Wink Saville

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=7v4psgduzg.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=wink@saville.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