git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jike Song" <albcamus@gmail.com>
To: chris@seberino.org
Cc: git@vger.kernel.org
Subject: Re: How make "git checkout <commit> <file>" *not* alter index?
Date: Tue, 6 Jan 2009 14:17:16 +0800	[thread overview]
Message-ID: <df9815e70901052217m3bdb29e4y8f28a1300169c1ea@mail.gmail.com> (raw)
In-Reply-To: <20090106051852.GA3278@seberino.org>

On Tue, Jan 6, 2009 at 1:18 PM,  <chris@seberino.org> wrote:
> I want to pull an old version of a file into my local directory and make it
> appear like work I haven't added to index yet...
>
>
> So how modify
>
>
> git checkout <commit> <file>
>
> to do this?

I have a stupid way to do this:

 $ git show v2.6.12:Makefile > Makefile
 $ git diff --cached  /* no outputs */

Ugly but seems work.

-- 
Thanks,
Jike

  reply	other threads:[~2009-01-06  6:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-06  5:18 How make "git checkout <commit> <file>" *not* alter index? chris
2009-01-06  6:17 ` Jike Song [this message]
2009-01-06  6:26 ` Junio C Hamano
2009-01-07  6:55   ` chris

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=df9815e70901052217m3bdb29e4y8f28a1300169c1ea@mail.gmail.com \
    --to=albcamus@gmail.com \
    --cc=chris@seberino.org \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).