2013-09-23 54 views
1

我已经恢复了一些代码并将其推送到远程git存储库中。即使将这些更改推送到远程存储库中,我如何“恢复”这些更改。如何撤消在git中推回复?

请在下面找到我做了什么:

git revert commit_id  
git push origin branch_name 

现在我可以撤销还原?

+0

谷歌,这里有足够的话题... http://stackoverflow.com/questions/6441902/undo-a-git-commit-after-push-using-reverse-patch http:// stackoverflow.com/questions/1270514/undoing-a-git-push – RedX

+0

关于撤消git恢复http://stackoverflow.com/questions/3662543/is-there-any-way-to-undo-the-effects-of -git-revert-head和相当具体的http://stackoverflow.com/questions/8728093/how-to-i-un-revert-a-reverted-git-commit – RedX

回答

3

您所做的更改为push ed。不要改变别人的历史!

git checkout branch_name 
git revert revert_id 
git push origin branch_name