undo commit after push git code example
Example 1: undo commit git before push
git reset HEAD~
Example 2: undo git commit after push
git reset <hash> # Run this then merge, commit, and push
git reset HEAD~
git reset <hash> # Run this then merge, commit, and push