undo last commit git after push code example
Example 1: undo git commit after push
git reset <hash> # Run this then merge, commit, and push
Example 2: github undo last pushed commit
git reset <previous label or sha1>
git commit -am "blabla"
git push -f <remote-name> <branch-name>
Example 3: undo last commit pushed
git reset # commitId
# Exemple
git reset 5310517