From: Andrew Wong <andrew.w@sohovfx.com>
To: Matteo Cypriani <mcy@lm7.fr>
Cc: git@vger.kernel.org
Subject: Re: Preserve merge changes with rebase -p
Date: Tue, 21 Jun 2011 10:44:48 -0400 [thread overview]
Message-ID: <4E00AE60.5000801@sohovfx.com> (raw)
In-Reply-To: <201106211411.31739.mcy@lm7.fr>
On 06/21/2011 08:11 AM, Matteo Cypriani wrote:
> The thing is, my M was not a "simple merge commit", but contained some changes
> needed for the code in master and topic to work together. In that case, git
> rebase -i -p recreates a merge commit, but it does not keep the changes
> introduced in M.
>
> Is there any way to keep the M's changes in my case (except to manually patch
> & amend the re-created merge commit) ?
>
Unfortunately, I don't think there's any nice way to do it right now. I
think what you could do for now is make the "pick <M>" into a "edit
<M>", together with other changes you want to make. And then when you
get to "edit M", do a "git cherry-pick -n -m 1 <M>", or "-m 2" depending
on how your merge was done. That should bring your changes over. Then
you just need resolve and add any conflicts, and do a "rebase --continue".
I've only tried it on a simple case and that seems to work.
> If not, maybe it would be a nice functionnality to implement ?
>
I imagine this is pretty useful feature to have too. I could look into
adding this support when I got a chance. I haven't given it much thought
yet though, so I don't know how feasible it is.
next prev parent reply other threads:[~2011-06-21 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 12:11 Preserve merge changes with rebase -p Matteo Cypriani
2011-06-21 14:44 ` Andrew Wong [this message]
2011-06-21 15:07 ` Matteo Cypriani
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=4E00AE60.5000801@sohovfx.com \
--to=andrew.w@sohovfx.com \
--cc=git@vger.kernel.org \
--cc=mcy@lm7.fr \
/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