Re:Linus’s rules on keeping Git history clean (2009)
by kevsim on Wednesday September 04, 2019 @01:40PM
(#20879551)
I get your point, but checking in security keys is cause to rotate keys, not to rebase and force push.
Re:Linus’s rules on keeping Git history clean (2009)
by dahart on Wednesday September 04, 2019 @03:09PM
(#20880405)
100% absolutely agreed if the keys were accidentally made public outside the org. If not, rotating keys is sometimes a bit more work than a quick rebase & push.
It was the best example of an exception to the rule I could think about, but personally, my threshold for whether rebasing master is ever allowed might be closer to 'no if team is larger than 3 people, otherwise try not to, think twice, and ask everyone first.'
It’s probably fine on a very small team, but pull with rebase doesn’t protect you from merge conflicts when someone rebases master underneath you, this is why the practice of rebasing public history is and should generally be considered an anti-pattern.