Cheatsheet Pages / Git Cheatsheet
How to undo a pushed commit safely — git revert
A commit that is already pushed and shared turns out to be wrong and must be undone safely.
git revert <commit-sha> # safe undo; use this instead of reset on pushed work
Good to know
Creates a new commit that undoes an old one — safe for shared branches, unlike reset.
