#将你的本地分支重置到指定的提交状态。
git reset --hard <commit-id>
#强制推送
git push --force-with-lease
git push --force-with-lease比git push --force更安全,命令背后的逻辑是:“只有当我的本地分支所知道的远程分支尖端仍然与远程仓库上的实际尖端相匹配时,才执行强制推送。”
#将你的本地分支重置到指定的提交状态。
git reset --hard <commit-id>
#强制推送
git push --force-with-lease
git push --force-with-lease比git push --force更安全,命令背后的逻辑是:“只有当我的本地分支所知道的远程分支尖端仍然与远程仓库上的实际尖端相匹配时,才执行强制推送。”