From: Shawn O. Pearce Date: Tue, 29 Jun 2010 15:17:16 GMT Subject: Re: recovering orphaned commit Message-ID: <20100629151716.GF2337@spearce.org> In-Reply-To: Mahesh Vaidya wrote: > I have a situation like this; 2 commits. > > Example - > > 2899684ed173063354b7fe4f5ec7216e7d953e2c <-- HEAD ( say C1) > 1ef67de1a0d6e97470a8c827d2989317600532ff ( say C2) > > To see file at C2 ; I have done git reset --hard C2; I could see the file. > Now want go to C1 ; Ho do I Determine C1 using git command ? Use `git reflog show` or `git log -g` to view the reflog entries for HEAD. It will show you the different states HEAD had, so you want to find the state before you reset to C2, that would be C1. -- Shawn.