From: Junio C Hamano <junkio@cox.net>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: Stupid question on getting branch from yesterday
Date: Wed, 14 Feb 2007 11:50:08 -0800 [thread overview]
Message-ID: <7vbqjwo6xb.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <17875.25882.784307.731860@lisa.zopyra.com> (Bill Lear's message of "Wed, 14 Feb 2007 13:38:02 -0600")
Bill Lear <rael@zopyra.com> writes:
> I have not yet figured this one out: I have not tagged anything, but
> know that I checked in something lame sometime between now and two days
> ago. How do I get my working repo to be that as it was, say, yesterday?
>
> Do I do:
>
> % git log --since="2 days ago"
>
> parse, the output for the commit I want, and then do
>
> % git reset <SHA>
>
> or would I do
>
> % git reset --soft <SHA>
>
> or something else?
Do you mean you have something like this:
---o---o---o---o---o---*---o---o HEAD
^ ^
two days lame
ago
and want to revert the lame one, or do you mean
---o---o---o---o---o---*---*---* HEAD
^ ^ ^ ^
two days lame
ago
all are lame after certain point and want to discard all of
them?
If the latter, probably "reset --hard <first-lame-one>^" (i.e.
the parent of the first lame one) is what you want.
If the former, you may want to "git revert <lame>" or "git
rebase --onto <lame>^ <lame>".
next prev parent reply other threads:[~2007-02-14 19:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-14 19:38 Stupid question on getting branch from yesterday Bill Lear
2007-02-14 19:49 ` Shawn O. Pearce
2007-02-14 19:54 ` Junio C Hamano
2007-02-14 20:24 ` Bill Lear
2007-02-14 20:28 ` Bill Lear
2007-02-14 20:36 ` Jeff King
2007-02-14 19:50 ` Junio C Hamano [this message]
2007-02-14 21:13 ` Linus Torvalds
2007-02-14 21:25 ` Junio C Hamano
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=7vbqjwo6xb.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox