文件夹结构更改后如何恢复提交的SVN项目版本?
在开发这个小项目的过程中我使用了SVN和Tortoise。后来我决定更改项目文件夹下的目录层次结构。根项目文件夹包含许多子文件夹,因此我创建了一个新文件夹,并将我想要分组的所有文件夹放入其中。之后我提交了更改。实际上我认为新的目录树将根据本地更改在 SVN 存储库中更新。但是出了问题,SVN-client 中的所有版本都消失了。我现在发现有 SVN 的移动和重新定位命令,我可能应该使用它们。
问题是为什么会发生这种情况以及如何恢复我的存储库?
提前致谢。
During the development of the small project I used SVN and Tortoise. Later on I decided to change the directory hierarchy under my project's folder. The root project folder contained to much subfolders so I made a new one and put all the folders I wanted to group in it. After that I submitted changes. Actually I thought that the new directory tree was going to be updated whithin SVN repository in accordance with local changes. But something went wrong and all the versions in SVN-client disappeared. I found for now that there are move and relocate commands to SVN and I probably should use them.
The questions are why is that happen and how to restore my repository?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从您的工作副本中,在项目根目录上执行“显示日志”,选择错误的提交,然后选择“恢复此版本的更改”。这将使您的工作副本像错误提交之前一样。正确重做更改,然后提交。
如果存在多个错误提交,则找到最新的良好提交,然后选择“恢复到此修订版”。正确重做更改,然后提交。
From your working copy, do a Show Log on your project root, select the bad commit, and choose "revert changes from this revision". This will make your working copy as before the bad commit. Redo the changes correctly, and then commit.
If there has been multiple bad commits, then find the latest good commit, and choose "Revert to this revision". Redo the changes correctly, and then commit.