From: Johannes Sixt <j.sixt@viscovery.net>
To: Samuel Tardieu <sam@rfc1149.net>
Cc: Stephen Haberman <stephen@exigencecorp.com>, git@vger.kernel.org
Subject: Re: rebasing merges
Date: Tue, 23 Sep 2008 09:52:50 +0200 [thread overview]
Message-ID: <48D8A052.6000101@viscovery.net> (raw)
In-Reply-To: <2008-09-23-09-30-47+trackit+sam@rfc1149.net>
Samuel Tardieu schrieb:
>>>>>> "Johannes" == Johannes Sixt <j.sixt@viscovery.net> writes:
>
> Johannes> i.e. linearized history without merges.
>
> A few days ago, I had a question in my team quite similar to Stephen
> concern. A developer had performed a merge of a complex feature and
> was ready to commit it
>
> --o--o--o--o--X <-- origin
> \ \
> A--B--C--D--E <-- master
>
> when he realized that someone just pushed another change on origin
> while he was doing the complicating merge (with lots of conflicts to
> resolve). The configuration was then:
>
> --o--o--o--o--X--Y <-- origin
> \ \
> A--B--C--D--E <-- master
>
> He would have wanted to have the merge rebased on E and Y instead of E
> and X before pushing, without going through all the conflicts
> resolution again (he didn't have "rerere" enabled).
If you mean "merge", and you are willing to keep E, then you do another
merge to get this history:
--o--o--o--o--X--Y <-- origin
\ \ \
A--B--C--D--E--F <-- master
and the previous conflicts will not show up again. But if you do not want
E to show up in the history, like this:
--o--o--o--o--X--Y <-- origin
\ \
A--B--C--D-----F <-- master
then you will have to resolve all conflicts again. Of course, you can keep
E in a temporary branch, and you can selectively check out files from
that tree to safe some work, but whether this is possible depends on the
changes that Y introduces.
If you mean "rebase", then you get this after the first rebase:
--o--o--o--o--X--Y <-- origin
\
A'--B'--C'--D' <-- master
Then you can rebase again to get this:
--o--o--o--o--X--Y <-- origin
\
A"--B"--C"--D' <-- master
at which time you don't see the old conflicts again.
-- Hannes
next prev parent reply other threads:[~2008-09-23 7:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 20:57 rebasing merges Stephen Haberman
2008-09-23 4:19 ` Stephen Haberman
2008-09-23 6:09 ` Johannes Sixt
2008-09-23 7:30 ` Samuel Tardieu
2008-09-23 7:52 ` Johannes Sixt [this message]
2008-09-23 8:06 ` Andreas Ericsson
2008-09-23 7:46 ` Stephen Haberman
2008-09-23 8:00 ` Johannes Sixt
2008-09-23 8:20 ` Andreas Ericsson
2008-09-23 9:03 ` Stephen Haberman
2008-09-23 9:11 ` Andreas Ericsson
2008-09-23 9:30 ` Stephen Haberman
2008-09-23 18:29 ` Stephen Haberman
2008-09-23 11:16 ` SZEDER Gábor
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=48D8A052.6000101@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=sam@rfc1149.net \
--cc=stephen@exigencecorp.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;
as well as URLs for NNTP newsgroup(s).