From: Bill Lear Date: Wed, 14 Feb 2007 20:24:09 GMT Subject: Re: Stupid question on getting branch from yesterday Message-ID: <17875.28649.796301.17874@lisa.zopyra.com> In-Reply-To: <20070214194919.GE28290@spearce.org> On Wednesday, February 14, 2007 at 14:49:19 (-0500) Shawn O. Pearce writes: >Bill Lear wrote: >> I have not yet figured this one out: I have not tagged anything, but >> know that I checked in something lame sometime between now and two days >> ago. How do I get my working repo to be that as it was, say, yesterday? >> >> Do I do: >> >> % git log --since="2 days ago" >> >> parse, the output for the commit I want, and then do >> >> % git reset > >No. This would update your branch and your index to , but >leave your working directory alone. That's not what you want here. > >Use `git checkout ` which will detach your HEAD and seek to >the commit, leaving your current commit alone. Later you can get >back by `git checkout oldbranch`. Ah, ok, then, you can use checkout with the SHA... Junio, I was talking about just getting back to "lame" and inspecting, fixing, etc., not getting rid of things back to then. Bill