GitHub撤回对远程仓库的push【本人亲测】

63 阅读1分钟
  1. 查看需要回退的版本号
git log

image.png 3. 撤回commit

git reset --soft 版本号
  1. 强制push
git push --force

如果使用 git push origin 分支名 –-force 或者 git push会报错

image.png