2 ms·
If your team is rebasing already public history, then you’re right. Is that what you’re talking about? History should be cleaned up locally before pushing elsew
by dahart 7y ago
If your team is rebasing already public history, then you’re right. Is that what you’re talking about? History should be cleaned up locally before pushing elsewhere. Once pushed, history shouldn’t be rewritten except in emergencies, and even then it should be discussed and communicated and everyone should agree a rewrite is better than more pushes to fix the problem. A case where a rewrite is preferable is when someone accidentally checks security keys into git, for example.
Rebasing before pushing should be embraced, are you sure that’s not the majority of what’s happening?
- jayd16 7y agoThe issue is its easy to screw up this advice. This is like saying only look down the barrel of a gun if you know its not loaded.
- dahart 7y agoHow so? And which part? I think it’s difficult to rebase already pushed history accidentally, because that requires a force push. You have to opt-in and take action to do it, so it’s not easy to screw up unintentionally.
- jayd16 7y agoWell you can say having to force is a solid barrier but you'll see plenty of comments suggesting that as well as plenty of comments stemming from having had to clean it up.
- dahart 7y agoSure, but that’s completely different from your hyperbolic analogy of looking down the barrel of an unloaded gun. Force push has a solid barrier, it is not default behavior, it gives you warnings, the manual gives warnings, and if you read anything online you’ll find many warnings against. If people still do it not knowing what they’re doing, yes it can definitely cause problems, but you can’t call it an accident or easy to screw up.