DEV Community

Discussion on: 6 Git commands every beginner should memorize

Collapse
 
exadra37 profile image
Paulo Renato

This is a very bad advice, and should be never used, not even in solo projects, because you get into a bad habit that can have pretty nasty consequences in a professional environment, like Jenkin developers accidentally do "git push --force" to over 150 repos on github.

I don't have the link anymore, but I read a story once of a company that took months to recover from a git push --force to their master branch.

To be on the safe side ALWAYS configure your Github, Gitlab or whatever you use to not accept push to master.