如何从 Subversive 恢复/回滚到文件的早期版本?
我对源代码管理和 Subversive 完全陌生,并且我已经提交了对不应该修改的文件的更改。我已经在文档和互联网上搜索了一个多小时,但我想我对这些术语还不够熟悉。此外,许多源代码控制资源似乎是供命令行用户使用的。
这是我到目前为止所尝试过的:首先,我使用了 Team > >恢复选项,但我后来发现这只影响本地副本。我查看了存储库的 Web 界面,但它只提供了 diff 工具,而不提供回滚工具。我还打开了“历史记录”选项卡,并在上下文菜单中找到了“恢复修订版 X 的更改”和“切换到修订版 X”。
根据我找到的文档,我认为其中之一是我需要的,但我不确定是哪一个。另外,我不知道是否选择当前版本,因为那是我想要撤消的版本,或者是之前的版本,因为那是我想要到达的版本。如果这是一个代码问题,我只需运行一个小测试,但在这种情况下,我担心选择错误的选项会让事情变得更糟,而且我不想用无用的测试文件弄乱存储库。
因此,总而言之:如何使用 Subversive 将单个文件回滚到其前一个版本?
I'm completely new to source control and Subversive, and I've committed changes to a file that shouldn't have been modified. I've done over an hour of searching documentation and the Internet about this, but I guess I'm not familiar enough with the terminology. Also, a lot of source control resources seem to be for command line users.
Here's what I've tried so far: first, I used the Team > Revert option, but I've since found that that only affect the local copy. I looked at the repository's web interface, but it only provided a diff tool, not a rollback tool. I've also opened the History tab and found "Revert Changes from Revision X" and "Switch to Revision X" in context menus.
Based on the docs I've found, I think one of those is what I need, but I'm not sure which. Also, I don't know whether to select the current revision, because that's the one I want to undo, or the one before it, because that's the one I want to get to. If this were a code problem, I'd just run a little test, but in this case I'm afraid I'll make things worse by selecting the wrong option and I don't want to clutter the repository with a useless test file.
So, in summary: How can I use Subversive to roll back a single file to its immediately previous version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
恢复是正确的命令。您无法“撤消”服务器上的提交,使其不可见。您需要做的是恢复该修订版的更改(或将您的更改恢复到修订版之前的修订版,我认为这两个选项都显示在 subclipse 的日志中),这会将您的工作副本回滚到之前的状态,然后提交。
另:是哪个?颠覆性还是子剪辑?
Revert is the right command. You can not "undo" a commit on the server so that it is not visible. What you need to do is revert the changes from that revision (or revert to the revision before the revision with your changes, I think both options are presented in subclipse's log), which rolls back your working copy to the state it was before, and then commit.
Also: Which is it? Subversive or subclipse?
您可以使用以下命令查看您想要的版本:
或者如果尚未提交,您可以使用
You can check out the version you want using:
Or if it wasn't committed, you can use