git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Nico -telmich- Schottelius <nico-linux-git@schottelius.org>
Cc: git@vger.kernel.org
Subject: Re: Problem getting older version
Date: Wed, 19 Oct 2005 01:26:43 -0700	[thread overview]
Message-ID: <7vach5ewu4.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20051019080046.GI22986@schottelius.org> (nico-linux-git@schottelius.org's message of "Wed, 19 Oct 2005 10:00:46 +0200")

Nico -telmich- Schottelius <nico-linux-git@schottelius.org> writes:

> The following situation:
>
> - The last commit was a merge, mhich broke some files
> - We want three files from the commit before

With only git-core tool, with the tip of the master branch,
would be:

    $ git pull somewhere ;# this caused the mismerge
    $ git checkout HEAD^ foo.c bar.c baz.c

This assumes that HEAD is a merge and HEAD^ (= HEAD^1) is the tip
of your branch before that merge (HEAD^2 would be what you
pulled from "somewhere").

The latest "git checkout", when given extra paths parameters,
does not switch branches.  Instead it pulls out named files from
the given version into your index, and checks them out. 

> Now I was told to do the following:

These 5 steps look correct; after that, you probably would want
to run git-update-index on those three paths.

  reply	other threads:[~2005-10-19  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-19  8:00 Problem getting older version Nico -telmich- Schottelius
2005-10-19  8:26 ` Junio C Hamano [this message]
2005-10-20  1:42 ` Petr Baudis
2005-10-24  5:23   ` Nico -telmich- Schottelius

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=7vach5ewu4.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=nico-linux-git@schottelius.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).