[GRLUG] git syntax question

Adam Tauno Williams awilliam at whitemice.org
Thu Nov 10 05:21:48 EST 2011


On Thu, 2011-11-10 at 04:36 +0000, Nathan Phillip Brink wrote:
> On Wed, Nov 09, 2011 at 04:56:16PM -0500, Adam Tauno Williams wrote:
> > I'm working with Samba 4 check out of git.  In tracking down a bug I've
> > been asked to test it prior to commit
> > 995d1567265be178b4e45f79ea4562a7041ffa52.  What is the git'y speak for
> > rolling back a repo to prior to a specified commit?
> I don't think that this person wants you to do a revert commit. What I
> would do is:
> $ git checkout 995d1567265be178b4e45f79ea4562a7041ffa52^
> The `^' tells git to get the parent of the previous commit hash. Git
> will complain about you working in a `detached head'(?) state, but
> that is what you want -- to look at what the project looked like back
> in time.

Excellent, thanks.  This performed the requested operation; right down
to the gripe about the 'detached head'.

$ git checkout 995d1567265be178b4e45f79ea4562a7041ffa52^




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the grlug mailing list