DEV Community

Discussion on: How to clear commit history using GIT

Collapse
yoursunny profile image
Junxiao Shi

Last time I force-pushed to the main branch, people started screaming up and down the hallway. Since then, I configured branch protection rule in GitHub, and it's no longer possible to force-push or clear commit history.
I keep my history clean since the beginning, and never need to cleanup upon release.