Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: "Gustav Hållberg" <gustav@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question about removing changes from the index
Date: Fri, 6 Feb 2009 15:09:11 +0100	[thread overview]
Message-ID: <20090206140911.GC31491@atjola.homenet> (raw)
In-Reply-To: <a1e915350902060557m5a67eba0q819c2ba2a0a49c21@mail.gmail.com>

On 2009.02.06 14:57:35 +0100, Gustav Hållberg wrote:
> I'm wondering if there's anyone who can recommend a smart way to
> "reset" the index entry for individual files to the contents of HEAD,
> in effect, removing any previous change between HEAD and the index
> (for those files).

Believe it or not, it's "git reset" ;-)

git reset -- file

You can only reset the index entry for that file to some older version,
e.g. "git reset HEAD~5 -- file".

Björn

  reply	other threads:[~2009-02-06 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 13:57 Question about removing changes from the index Gustav Hållberg
2009-02-06 14:09 ` Björn Steinbrink [this message]
2009-02-06 14:51   ` Gustav Hållberg
2009-02-06 14:11 ` Matthieu Moy
2009-02-06 14:14 ` Sitaram Chamarty

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=20090206140911.GC31491@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gustav@gmail.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