DEV Community

Discussion on: How to Undo Pushed Commits with Git

Collapse
 
po0q profile image
pO0q 🦄

@blackgirlbytes the problem is who's using it. Every time someone tries to manipulate the history and overwrite stuff, it's a bit risky, by nature. Even if git experts might have appropriate usages of the command, I prefer disabling it as a general rule (e.g., in GitHub, you can protect branches against force push).

If you work alone, you do what you want, including rewriting history, but at your own risks if you damage your repository. If you work in a team, that's not acceptable because you might mess with other's work.

Thread Thread
 
blackgirlbytes profile image
Rizèl Scarlett

You’re absolutely right