> Date: Wed, 18 May 2011 18:53:01 -0400 > From: johnlumby@xxxxxxxxxxx > To: git@xxxxxxxxxxxxxxx > Subject: git -- how to revert build to as-originally-cloned? > > I am stuck trying to revert a private kernel build back to the state in > which I originally cloned it, > (after probably doing the wrong thing - as below). Hoping someone > can advise. > > Here's what I did (helpful criticism welcome) > > On machine MA in filesystem /a on 13 May > > git clone > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git > ... > > I have tried all the commands I can find that claim to do this > and none of them have done it, e.g. : > git reset --hard HEAD /* did nothing */ > git reset --hard ORIG_HEAD /* did nothing */ > > Not only that, but none of the various show , log , status commands > appear to be aware of the merge at all. There appears to be no record > of it - > but the actual files themselves are the updated ones. (diff with /b > compares equal) > > How can I undo it? > > Cheers John Lumby You should now have a merge commit. git log should show the latest commit with a message similar to "merge blah". Normally in order to undo a merge, you would simply do a "git reset --hard HEAD^". Take note of the carat(is that correct?) character; that means the commit BEFORE head. Can you please post the commit message that you see in the first commit when doing a git log? Also, if you just want to go back to a particular branch, you can specify it to git reset, in the form of "git reset --hard origin/master". This will reset (discarding any changes) YOUR branch to wherever origin/master happens to be, which, from reading your message seems to be where you want to go? Be careful if you have made changes you want to keep, though. Cheers, Tim. () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html