1. Revert the commit (keep history)
git checkout dev
git revert HEAD
git push origin dev
  1. Hard reset + forch push (rewrite history)
git checkout dev
git reset --hard HEAD~1
git push --force origin dev

git 常用命令