Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive Rebase With History Preserving Past Merges #170

Open
RandomDSdevel opened this issue Sep 22, 2020 · 1 comment
Open

Interactive Rebase With History Preserving Past Merges #170

RandomDSdevel opened this issue Sep 22, 2020 · 1 comment

Comments

@RandomDSdevel
Copy link

     Twice now, I've been working in different repositories and wishing that 'git imerge' had an equivalent to 'git rebase -i --preserve=merges' I could use to 'rebase with history.' For whatever reason, I have a feeling this feature request could prove quite difficult to implement, but I just thought I'd put it out there. (I can split this into two feature-request issues — one each for interactive 'git imerge' 'rebase with history' and 'imerge' 'rebase with history' preserving past merges, respectively —&hinsp;if desired/on request.)

@mhagger
Copy link
Owner

mhagger commented Sep 22, 2020

I don't know a lot of the details of --preserve=merges so it's hard for me to say how difficult it would be. ISTM that it depends a lot on the branch point of the merged-in branches.

If a merged-in branch sprouted from the target branch before the branch being rebased, then it seems like it would be a relatively simple matter of rebasing the -m1 diff of the merge commit, then adding the original second parent to the rebased merge commit. I don't think that this would require dramatic changes to git-imerge.

But if the merged-in branch has other ancestors on the to-be-rebased branch, then it gets more complicated.

I don't expect to have time to work on this myself in the foreseeable future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants