From: Theodore Tso <tytso@mit.edu>
To: Tomas Carnecky <tom@dbservice.com>
Cc: Zabre <427@free.fr>, git@vger.kernel.org
Subject: Re: (beginner) git rm
Date: Wed, 28 Jan 2009 08:03:33 -0500 [thread overview]
Message-ID: <20090128130333.GA11160@mit.edu> (raw)
In-Reply-To: <49804D41.3010801@dbservice.com>
On Wed, Jan 28, 2009 at 01:19:13PM +0100, Tomas Carnecky wrote:
>
> Oops, sorry. git checkout HEAD -- d.txt
> You have to tell which version of d.txt you want. In your case the
> version in HEAD.
>
I use this command enough that I have this defined as an alias in my
~/.gitconfig file. Try running this command:
git config --global alias.revert-file "checkout HEAD --"
Now you will be able to do this:
git revert-file d.txt
This is also useful when I've edited d.txt, and decided that I didn't
go about it the right away, and so I want to revert my edits.
- Ted
next prev parent reply other threads:[~2009-01-28 13:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 10:11 (beginner) git rm Zabre
2009-01-28 10:36 ` Peter Krefting
2009-01-28 11:05 ` Zabre
2009-01-28 11:37 ` Tomas Carnecky
2009-01-28 12:00 ` Zabre
2009-01-28 12:19 ` Tomas Carnecky
2009-01-28 13:03 ` Theodore Tso [this message]
2009-01-28 18:25 ` Zabre
2009-01-28 18:23 ` Zabre
2009-01-28 20:17 ` Björn Steinbrink
2009-01-28 20:42 ` Zabre
2009-01-28 21:05 ` Zabre
2009-01-28 21:29 ` Junio C Hamano
2009-01-28 22:13 ` Björn Steinbrink
2009-01-28 22:33 ` Junio C Hamano
[not found] ` <6bef44ba0901281711m2d05e70fj4dd3ae03d7fe1052@mail.gmail.com>
2009-01-29 2:34 ` Björn Steinbrink
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=20090128130333.GA11160@mit.edu \
--to=tytso@mit.edu \
--cc=427@free.fr \
--cc=git@vger.kernel.org \
--cc=tom@dbservice.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.