撤销上一次push

53 阅读1分钟

git reset --hard HEAD^ 可以本地删掉最后一个commit。

git push --force-with-lease 推送到远程删掉最后一个commit。

git cherry-pick HASH 最后本地恢复最后一个commit。