git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git -- how to revert build to as-originally-cloned?

From
JLJohn Lumby <johnlumby@hotmail.com>
Date
May 18, 2011, 22:53 UTC
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
Next: Tim Mazid
Message 1 of 6 in “git -- how to revert build to as-originally-cloned?”
  1. John LumbyMay 18, 2011
  2. Tim MazidMay 18, 2011
  3. John LumbyMay 19, 2011
  4. Tim MazidMay 20, 2011
  5. John LumbyMay 20, 2011
  6. Philippe VaucherMay 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.