From: Tim Mazid <timmazid@hotmail.com>
To: <johnlumby@hotmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: RE: git -- how to revert build to as-originally-cloned?
Date: Thu, 19 May 2011 09:26:45 +1000 [thread overview]
Message-ID: <SNT124-W3827431D13C320A4C9BF9DC48F0@phx.gbl> (raw)
In-Reply-To: <4DD44DCD.7010508@hotmail.com>
> Date: Wed, 18 May 2011 18:53:01 -0400
> From: johnlumby@hotmail.com
> To: git@vger.kernel.org
> 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
next prev parent reply other threads:[~2011-05-18 23:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 22:53 git -- how to revert build to as-originally-cloned? John Lumby
2011-05-18 23:26 ` Tim Mazid [this message]
2011-05-19 15:27 ` John Lumby
2011-05-20 2:16 ` Tim Mazid
2011-05-20 14:15 ` John Lumby
2011-05-20 14:42 ` Philippe Vaucher
2011-05-20 16:25 George Spelvin
2011-05-20 19:18 ` John Lumby
2011-05-20 19:34 ` Paul Ebermann
2011-05-20 20:22 ` George Spelvin
2011-05-20 20:26 ` George Spelvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SNT124-W3827431D13C320A4C9BF9DC48F0@phx.gbl \
--to=timmazid@hotmail.com \
--cc=git@vger.kernel.org \
--cc=johnlumby@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.