Re:Julia Evans: Git rebase, what can go wrong
by ender341341 on Monday November 06, 2023 @12:52PM
(#38165995)
> Don't try to do smart weird rebases!!!
If I need to do a non-trivial rebase I always start by creating a backup branch so I can delete my fuck up and start over trivially, which was a hard learned lesson.
Re:Julia Evans: Git rebase, what can go wrong
by heisenberg302 on Monday November 06, 2023 @01:01PM
(#38166133)
also you can use git rerere if you need multiple goes for the rebase, it saves your conflict resolutions and applies them automatically when they occur again(you need to resolve the conflict when it happens for the first time).
I do a lot of rebases, but they are trivial rebases in a feature branch, like changing the order of new features and fixups, and then squashing the fixups to make a nice PR. Don't try to do smart weird rebases!!!
From time to time I have to make a smart weird rebase because my small commits order is just a mess, or I have to split a commit or something unusual. The important first step is to make a new brach as a backup to hold the version before the rebase. If I mess the rebase process I can just go back to my version before the rebase and star again.