zlacker

[parent] [thread] 3 comments
1. the_gi+(OP)[view] [source] 2025-12-05 10:30:50
I usually just `git rebase origin/main -i` after the base branch has been merged there, and this means I need to explicitly drop the merged commits, but I can inspect what's happening.
replies(1): >>Xophme+yy
2. Xophme+yy[view] [source] 2025-12-05 14:15:51
>>the_gi+(OP)
Yeah, I do this too: The `--onto` solution feels a bit too magical at times and an interactive rebase is pretty clear about what's happening.
replies(1): >>WorldM+1d1
◧◩
3. WorldM+1d1[view] [source] [discussion] 2025-12-05 17:06:30
>>Xophme+yy
Add `--update-refs` to your interactive rebase and it will give you an easy line to know how many commits to drop because it will add an `update-ref` line for the old branch. You can just easily delete everything up to and including that `update-ref` line and don't have to manually pull up a git log of the other branch to remember which commits already merged.

(Plus, of course, if you have multiple branches stacked, `--update-refs` makes it easier to update all of them if you start from the outermost branch.)

replies(1): >>Xophme+2R3
◧◩◪
4. Xophme+2R3[view] [source] [discussion] 2025-12-06 15:52:13
>>WorldM+1d1
Nice; thanks :) I usually squash-merge. Does that break this workflow?
[go to top]