Stream: t-compiler/help

Topic: Place 2.0 git rebase


Santiago Pastorino (May 28 2019 at 11:20, on Zulip):

I'm rebasing https://github.com/rust-lang/rust/pull/60913 and hitting a lot of conflicts in the way

Santiago Pastorino (May 28 2019 at 11:20, on Zulip):

I'm wondering about good strategies to do so and avoid hitting all the conflicts at once

Santiago Pastorino (May 28 2019 at 11:21, on Zulip):

I was thinking that would be better to make the rebase in a tinier fashion but unsure if what I want is the best thing or if it's even possible

Santiago Pastorino (May 28 2019 at 11:21, on Zulip):

let's say that master is 1 -> 2 -> 3 -> 4 -> 5 and Place 2.0 is 1 -> 6

Santiago Pastorino (May 28 2019 at 11:22, on Zulip):

if I do git rebase I just get 1 -> 2 -> 3 -> 4 -> 5 -> 6 with all the conflicts at once

Santiago Pastorino (May 28 2019 at 11:23, on Zulip):

I was wondering if it's possible to make git rebase try, first 1 -> 2 -> 6 and if that works go to the next step

Santiago Pastorino (May 28 2019 at 11:23, on Zulip):

then do 1 -> 2 -> 3 -> 6 and if it works continue and so on until I get a conflict

Santiago Pastorino (May 28 2019 at 11:24, on Zulip):

is something like that possible? what do you people use as a way strategy to rebase things that are giving a LOT of conflicts

Santiago Pastorino (May 28 2019 at 11:24, on Zulip):

I'm getting small conflicts that are easy to fix inline but also there are sections that were moved to new files that are killing me in the process

oli (May 28 2019 at 12:03, on Zulip):

how about throwing away the conflicting large changes and just doing them again?

oli (May 28 2019 at 12:03, on Zulip):

or are there many?

Santiago Pastorino (May 28 2019 at 12:31, on Zulip):

yeah, my approach was going to be that one

Santiago Pastorino (May 28 2019 at 12:32, on Zulip):

but seems like if a git rebase step-by-step thing exists it’s better

Santiago Pastorino (May 28 2019 at 12:32, on Zulip):

unsure if a procedure like the one I’ve described exist

nikomatsakis (May 28 2019 at 13:40, on Zulip):

I"m not aware of any such procedure. If things get hard enough, I usually flatten to 1 commit and rebase that, and then go back and try to reconstruct intermediate steps.

Wesley Wiser (May 28 2019 at 13:54, on Zulip):

but seems like if a git rebase step-by-step thing exists it’s better

There is actually! It's called git-imerge. I've used it before and for complex rebases, it helps a lot

Wesley Wiser (May 28 2019 at 13:55, on Zulip):

It largely works the way you describe @Santiago Pastorino

Santiago Pastorino (May 28 2019 at 14:04, on Zulip):

@Wesley Wiser cool, I was already thinking on writing such a tool :)

Santiago Pastorino (May 28 2019 at 14:04, on Zulip):

glad that it exists

Last update: Nov 11 2019 at 23:20UTC