Git Cancel Last Commit
git reset --soft HEAD~1
Lucky Lapwing
git reset --soft HEAD~1
git reset --hard 71c27777543ccfcb0376dcdd8f6777df055ef479
git push --force
# First remove it form git
git reset --soft HEAD~1
# Second remove it form github
git push -f origin HEAD^:master
git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master
git reset --hard 71c27777543ccfcb0376dcdd8f6777df055ef479
git reset -- MAIN^
git reset -- MAIN^2 (reset last 2 commits)
(increase number for number of commits you want
to delete from your local repo, before youve pushed)