News for hackers. Stuff that matters.
Re:Extremely Linear Git History by YetAnotherNick on Tuesday November 22, 2022 @08:36AM (#33705588)
You should do reverse rebase(if it makes sense lol) for this. Instead of rebasing branch to master, rebase master to branch. The only downside is that it requires many force push in the branch.
Re:Extremely Linear Git History by moonchrome on Tuesday November 22, 2022 @09:18AM (#33706020)
Yeah force push on master is a huge no no - I can't even remember the number of times I've force pushed wrong shit in a hurry - I can't imagine entire team dealing with this.
Re:Extremely Linear Git History by simiones on Tuesday November 22, 2022 @10:42AM (#33706947)
I would first say that I would sooner re-code the whole feature by hand from memory than ever rebasing master onto anything for any serious project.

Even if we were to do that, rebasing master is likely to lead to the same issue.

My preferred solution is rebase featureB onto master for the 99% or 99.9% of use cases where this is smooth, and in the rare case that you have too many conflicts to resolve, merge master into featureB (and/or squash featureB then rebase onto master, depending on use case).

Re:Extremely Linear Git History by cerved on Tuesday November 22, 2022 @03:27PM (#33711012)
> it requires many force push in the branch

Can't say I recommend this approach.