From: Junio C Hamano Date: Wed, 19 Oct 2005 08:26:43 GMT Subject: Re: Problem getting older version Message-ID: <7vach5ewu4.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20051019080046.GI22986@schottelius.org> Nico -telmich- Schottelius 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.