问题描述
我在 Mac 上存储了一个项目,并为从该位置到我的项目创建了一个存储库.我可以使用源代码树提交,但现在我想恢复到较早的提交,以便更新文件夹中的所有文件?我不确定我是如何做到这一点的?
I have a project stored on my Mac and created a repository for from that location to my project. I am able to commit using source tree but now I would like to revert back to an earlier commit so all my files in folder update? I'm not sure how i do this?
推荐答案
临时恢复
如果你想暂时回到这个提交,那就回到你现在的位置.
If you want to temporarily go back to this commit, then come back to where you are.
右键单击要还原的提交,然后单击结帐".
Right click on the commit you want to revert to and click on "checkout".
永久还原
这将添加提交以恢复自提交以来的所有工作
This will add commits to revert all your work since this commit
右键单击要还原到的提交,然后单击重置 <> 到此提交".
Right click on the commit you want to revert to and click on "Reset <> to this commit".
这篇关于如何使用源树恢复到较早的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!