Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: ltuikov@yahoo.com
Cc: git@vger.kernel.org
Subject: Re: index manipulation -- how?
Date: Mon, 21 Nov 2005 23:05:48 -0800	[thread overview]
Message-ID: <7vbr0dgo1f.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20051122062048.8891.qmail@web31805.mail.mud.yahoo.com

Luben Tuikov <ltuikov@yahoo.com> writes:

> (There is a very similar construct in git-checkout.sh.
> So if you apply the patch below, please make sure
> git-checkout.sh doesn't break.)

Thanks.

> Question: so in effect, more generally:
>   git checkout <tree-ish> <file>
>
> would do the right thing: update index and the working
> tree as the file <file> looked as it was at <tree-ish>?

Yes that is correct.  Also by omitting <tree-ish> you can
checkout from the index.

I thought what you originally wanted to do was revert only index
without losing your changes from the working tree, so just to
make sure, the above does _not_ do it --- the named file in the
working tree is also reverted to the one from <tree-ish>.

  reply	other threads:[~2005-11-22  7:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22  5:03 index manipulation -- how? Luben Tuikov
2005-11-22  5:23 ` Linus Torvalds
2005-11-22  5:24 ` Junio C Hamano
2005-11-22  5:36   ` Junio C Hamano
2005-11-22  6:20     ` Luben Tuikov
2005-11-22  7:05       ` Junio C Hamano [this message]
2005-11-22  7:35         ` Luben Tuikov

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