我该如何修复恢复的git commit? [英] How can I fix a reverted git commit?
本文介绍了我该如何修复恢复的git commit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经对存储库进行了一系列更改,并且由其他人(他们在Windows上编译,但不在Linux上编译)还原了它们。我认为这些变化仍在历史中,但我怎样才能获得这些变化,修复它们,然后重新提交? 解决方案
p>您是否尝试恢复回复?
他们使用
回复您的提交 git还原<你的提交id>
恢复本身是一个提交并且有它自己的提交ID。所以,现在你需要做的是
git revert<他的revert-commit的提交ID>
I've committed a bunch of changes to a repository, and they were reverted by someone else (they compile on windows but not on linux). I think that the changes are still in the history, but how can I get those changes back, fix them, and then resubmit?
解决方案
Have you tried reverting the revert?
They reverted your commit using
git revert <your commit id>
The revert itself is a commit and has its own commit id. So now you need to do
git revert <the commit id of his revert-commit>
这篇关于我该如何修复恢复的git commit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文