3 ms·
> With that, I don't think git has any feature that is unsafe by default. Well, you just mentioned `--force`. It is unsafe by default. Git has a couple of flag
by IshKebab 3y ago
> With that, I don't think git has any feature that is unsafe by default.
Well, you just mentioned `--force`. It is unsafe by default. Git has a couple of flags to make it safer (`--force-with-lease`, `--force-if-includes`) but those aren't the default.
- withinboredom 3y agoIf you’ve ever had to remove private information from history before making the repos public (think domains, names, configuration, etc) you will appreciate the ability to rewrite history (and all the other things --force gives you)
- IshKebab 3y agoI don't get your point. Nobody is saying don't use `--force`. Just that the default `--force` flag is the most dangerous variant.
- withinboredom 3y agoI am not aware of any default use of force. Where does that happen?
- kristjansson 3y agoThe feature is 'git push'. --force is the opt-in to the unsafe behavior. It should not be used lightly.
- IshKebab 3y agoYou're missing the point. `--force` is the default of the force variants. The other `--force-but-something` arguments clearly modify that default. It's the wrong way round. Obviously they've done it for backwards compatibility, but the fact that they haven't even added an option to make it the default is pretty lame.