From: John Lumby Date: Wed, 18 May 2011 22:53:01 GMT Subject: git -- how to revert build to as-originally-cloned? Message-ID: <4DD44DCD.7010508@hotmail.com> 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 (This build built ok and ran ok and is what I want back) A few days later on machine MB on filesystem /b - same git clone command but of course a slightly changed build. Yesterday - I wanted to synch build a/ from b/ : git branch jel_r8169 /* made a new branch -- ok */ nfs-mounted /b on MA git fetch file:///a/.../net-next-2.6/.git /* worked ok * git merge FETCH_HEAD /* worked ok and output list of files : */ output started with Updating 72a8f97..1b1cb1f Fast-forward then list of files output ended with 56 files changed, 3352 insertions(+), 886 deletions(-) create mode 100644 include/net/ping.h create mode 100644 net/ipv4/ping.c I then built this build and built ok but build is broken - unresolved syms in some modules - I want to undo my merge. 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