From: Matteo Cypriani <mcy@lm7.fr>
To: git@vger.kernel.org
Subject: Preserve merge changes with rebase -p
Date: Tue, 21 Jun 2011 14:11:25 +0200 [thread overview]
Message-ID: <201106211411.31739.mcy@lm7.fr> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 1095 bytes --]
Hi all,
I needed to change the author of a commit that was before a merge in the
history. Here is a figure of my situation, E being the commit I want to edit,
and M the problematic merge commit:
o---o---o---o---o---o---o---o master
\ \
o---E---M---o---o topic
In a simple case, git rebase -i -p from topic does the trick here, I can amend
E and M is re-created correctly.
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) ?
If not, maybe it would be a nice functionnality to implement ?
Cheers,
Matteo
P.S.: Please CC me if you answer to this e-mail, as I'm not subscribed to the
list.
--
Ma clef GPG est disponible sur keyserver.veridis.com
My GPG key is available on keyserver.veridis.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2011-06-21 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 12:11 Matteo Cypriani [this message]
2011-06-21 14:44 ` Preserve merge changes with rebase -p Andrew Wong
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=201106211411.31739.mcy@lm7.fr \
--to=mcy@lm7.fr \
--cc=git@vger.kernel.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