From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Bill Lear <rael@zopyra.com>, git@vger.kernel.org
Subject: Re: Stupid question on getting branch from yesterday
Date: Wed, 14 Feb 2007 13:25:58 -0800 [thread overview]
Message-ID: <7vire4mnx5.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0702141250300.20368@woody.linux-foundation.org> (Linus Torvalds's message of "Wed, 14 Feb 2007 13:13:09 -0800 (PST)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> So depending on what your situation is, this sequence actually works:
>
> #
> # Create and check out a "fixes" branch that has the
> # known-broken commit as its head commit
> #
> git checkout -b fixes <BROKEN-COMMIT>
>
> .. edit edit edit to fix the broken commit ..
>
> #
> # Then, just _replace_ the broken commit with the fixed state
> # by doing a "git commit --amend"
> #
> git commit -a --amend
>
> #
> # ok, now the "fixed-branch" is in good shape, but we
> # want to re-surrect our original 'master' branch WITH the
> # fix, and based on the fixed branch, so we rebase the
> # master branch# _onto_ the fixed state in "fixes", with
> # the broken commit (that we do _not_ want to include) as
> # the base.
> #
> git rebase --onto fixes <BROKEN-COMMIT> master
>
> Somebody else should verify that "git rebase" thing.
Looks fine.
prev parent reply other threads:[~2007-02-14 21:26 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
2007-02-14 21:13 ` Linus Torvalds
2007-02-14 21:25 ` Junio C Hamano [this message]
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=7vire4mnx5.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.com \
--cc=torvalds@linux-foundation.org \
/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