如何在 git 中撤消推送还原



我已经恢复了一些代码并推送到远程 git 存储库中。如何"取消还原"更改,即使它已推送到远程存储库中。

请在下面找到我所做的:

git revert commit_id    
git push origin branch_name

现在我可以撤消还原吗?

您的更改已push编辑。不要改变别人的历史!

git checkout branch_name
git revert revert_id
git push origin branch_name

最新更新