* rebase converts merge commits
@ 2010-10-12 14:55 Sébastien Barthélemy
2010-10-12 14:58 ` Matthijs Kooijman
2010-10-12 20:27 ` Kevin Ballard
0 siblings, 2 replies; 5+ messages in thread
From: Sébastien Barthélemy @ 2010-10-12 14:55 UTC (permalink / raw)
To: git
Hello,
first of all, thank you for git this is a wonderful tool.
Yet, I have a problem while trying to rebase a bit of history which contains
merge commits.
I'm not sure whether I misuse something or whether this is a know (but
not documented?) limitation.
Here is more context.
I have the following history
* commit e1adb4bcd07372024689c697c56249ca6c044009
|
| fixed maintainer field
|
* commit 6aca4f53e8b7647df96dcd2caacde5883f9c67c5
|
| updated changelog for release 2.9.9-0ubuntu1
|
* commit 96d69d992afae69a8caba07ab9b5b6e5ed7d35d8
|
| updated lintian warning override
|
* commit 53171e21222b6a7fcb25620b1c30e427b9ada6a6
|\ Merge: 2d58bfe 4f3385d
| |
| | merged release 2.9.9
| |
| * commit 4f3385dd9cf129cb0d65c9fb3895fe61a03b8b59
| |
| | upstream 2.9.9 (developer) release
| |
* | commit 2d58bfed1cc234b5a76bde8216298a72db29aacc
| |
| | updated maintainer field
| |
* | commit 05b4de27b993dde0cc779364fa24223f29e66b0e
| |
| | changelog for 2.9.8-0ubuntu5
| |
...
commit 2d58bfe introduced a trivial error that got fixed in commit e1adb4b.
I would like to manipulate the history to get these two commits subsequent
(or even merge them). Eventually I'd like to get this history
* commit 6aca4f53e8b7647df96dcd2caacde5883f9c67c5'
|
| updated changelog for release 2.9.9-0ubuntu1
|
* commit 96d69d992afae69a8caba07ab9b5b6e5ed7d35d8'
|
| updated lintian warning override
|
* commit 53171e21222b6a7fcb25620b1c30e427b9ada6a6'
|\ Merge: e1adb4' 4f3385d
| |
| | merged release 2.9.9
| |
| * commit 4f3385dd9cf129cb0d65c9fb3895fe61a03b8b59
| |
| | upstream 2.9.9 (developer) release
| |
* | commit e1adb4bcd07372024689c697c56249ca6c044009'
| |
| | fixed maintainer field
| |
* | commit 2d58bfed1cc234b5a76bde8216298a72db29aacc
| |
| | updated maintainer field
| |
* | commit 05b4de27b993dde0cc779364fa24223f29e66b0e
| |
| | changelog for 2.9.8-0ubuntu5
| |
...
I tried with rebase -i, but it converts the merge commit into a normal commit.
Moreover, it asks me to resolve the merge conflict again.
I think this is a limitation of rebase, but I haven't read it stated anywhere,
so here I am, asking for a confirmation.
By the way, if there is a way to do what I want, please tell me.
I'm using git version 1.7.0.4.
Cheers
--
Sebastian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rebase converts merge commits
2010-10-12 14:55 rebase converts merge commits Sébastien Barthélemy
@ 2010-10-12 14:58 ` Matthijs Kooijman
2010-10-12 15:23 ` Sébastien Barthélemy
2010-10-12 20:27 ` Kevin Ballard
1 sibling, 1 reply; 5+ messages in thread
From: Matthijs Kooijman @ 2010-10-12 14:58 UTC (permalink / raw)
To: Sébastien Barthélemy; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
Hi Sébastien,
> Yet, I have a problem while trying to rebase a bit of history which contains
> merge commits.
Have you tried the --preserve-merges option to rebase?
Gr.
Matthijs
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rebase converts merge commits
2010-10-12 14:58 ` Matthijs Kooijman
@ 2010-10-12 15:23 ` Sébastien Barthélemy
0 siblings, 0 replies; 5+ messages in thread
From: Sébastien Barthélemy @ 2010-10-12 15:23 UTC (permalink / raw)
To: git
Hi Matthijs,
2010/10/12 Matthijs Kooijman <matthijs@stdin.nl>:
> Have you tried the --preserve-merges option to rebase?
No, I didn't know about this option. Thank you for the tip.
I just tried, and it does not work either. The merge commit is
preserved, but the commit I'm push back in time is lost.
There is a warning against this kind behaviour when using both
--interactive and rebase.
Thanks,
--
Sebastian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rebase converts merge commits
2010-10-12 14:55 rebase converts merge commits Sébastien Barthélemy
2010-10-12 14:58 ` Matthijs Kooijman
@ 2010-10-12 20:27 ` Kevin Ballard
2010-10-17 8:04 ` Sébastien Barthélemy
1 sibling, 1 reply; 5+ messages in thread
From: Kevin Ballard @ 2010-10-12 20:27 UTC (permalink / raw)
To: Sébastien Barthélemy; +Cc: git
On Oct 12, 2010, at 7:55 AM, Sébastien Barthélemy wrote:
> By the way, if there is a way to do what I want, please tell me.
Your history is short enough that if you can't get rebase to do what you want, you could always do it by hand. Create a temp branch to work on based on the bad commit, cherry-pick the good commit with --no-commit, then amend the bad commit. Then just cherry-pick each subsequent commit until you get to the merge. Re-perform the merge. Then just continue to cherry-pick subsequent commits. It's not ideal, but it should work.
-Kevin Ballard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rebase converts merge commits
2010-10-12 20:27 ` Kevin Ballard
@ 2010-10-17 8:04 ` Sébastien Barthélemy
0 siblings, 0 replies; 5+ messages in thread
From: Sébastien Barthélemy @ 2010-10-17 8:04 UTC (permalink / raw)
To: git
2010/10/12 Kevin Ballard <kevin@sb.org>:
> On Oct 12, 2010, at 7:55 AM, Sébastien Barthélemy wrote:
>
>> By the way, if there is a way to do what I want, please tell me.
>
> Your history is short enough that if you can't get rebase to do what you want, you could always do it by hand.
Sure. Thank you for making it clear.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-17 8:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-12 14:55 rebase converts merge commits Sébastien Barthélemy
2010-10-12 14:58 ` Matthijs Kooijman
2010-10-12 15:23 ` Sébastien Barthélemy
2010-10-12 20:27 ` Kevin Ballard
2010-10-17 8:04 ` Sébastien Barthélemy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.