From: Jeff King Date: Thu, 05 Apr 2007 13:43:12 GMT Subject: Re: 'git checkout -f' versus 'git reset --hard' Message-ID: <20070405134311.GA18163@coredump.intra.peff.net> In-Reply-To: <17940.64329.10165.993967@lisa.zopyra.com> On Thu, Apr 05, 2007 at 08:36:09AM -0500, Bill Lear wrote: > After a failed merge, I want to undo things. I typically use git > reset --hard, and it works like a charm. Others have tried to use git > checkout -f, but I have cautioned that git reset --hard is really the > way to do it. Is there a difference here, or are they equivalent? Skimming through the code (and looking at the output of sh -x), it looks like both just end up executing git-read-tree --reset -u $HEAD. -Peff