+1

Rebase: be able to add breakpoint on a "todo +N" commit to edit this commit when rebase continues

Nicolas Deveaud 1 year ago updated 1 year ago 3

In some cases during a rebase process (generally when reordering commits), when fixing a conflict I know there should be a conflict on next commit but this conflict is not detected.

In such case, when I continue rebase, the rebase finishes and ends-up with an unexpected change. Then I have to modify the "next commit" to apply the change that was missed.

This happens easily if you have a commit A that adds a function (any block of new lines), and a commit B that renames some variables, including in this new function.
If you switch commits order, you will probably end-up with the added function without expected renamed variables. You would have a conflict to solve when applying commit B, and the solution of the conflict would be to ignore extra lines (they will be added with commit A after). Then when you continue, commit A will just add the lines, without any conflict (new lines in both cases).

In such case, it would be really great if I could request git to stop after the next commit (like the edit option in interactive rebase), so I can apply the changes I know I need to apply.

When a rebase is in progress, I can see all next commits in the graph with the usefull "[todo +N]" labels. This is great.
If I had for example a contextual menu Item "Add rebase break" or anything alike on those commits "to be rebased", it would be wonderful.

It would be a little bit like interactive rebase, but defined during a current rebase instead of defining it at the beginning of the rebase process.

You might be interested in the "Modify-All Commits (Step/Continue)" feature in 21.1 preview: https://www.syntevo.com/smartgit/preview/

Sounds really promising, I'll have a try on this preview version as soon as possible ;)

Is there anywhere I can read more about this "Modify or Split Commit: allow to stop/edit all commits" feature ? (can't install it right now....)

Couldn't wait, I found a way to test :D

I love the "step..." button during a "Modify All" process !!

But could we have this same button for all stopped rebase cases ?
This would be great great great !!

The problem with the "Modify or Split" feature (I love it, that's not the question) is that one can't reorder commits with it. And I personally use a lot commit re-ordering.
And as I explained in the example I gave, this case where I usually need to "step" comes from a re-order scenario.

You're doing a great jobs guys, I'm sure you can do this !! :D