Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



If 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)


I don't get your point. Nobody is saying don't use `--force`. Just that the default `--force` flag is the most dangerous variant.


I am not aware of any default use of force. Where does that happen?


The feature is 'git push'. --force is the opt-in to the unsafe behavior. It should not be used lightly.


You'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: