需要在 Subversion 中恢复已删除的分支
我有两个 Subversion 存储库的工作副本,一个是主干,另一个是我创建的分支。
我不小心删除了存储库浏览器中的分支。如何恢复分支?有没有办法撤消整个存储库的最新提交?
I have two working copies of a Subversion repository, one of the trunk, and one of a branch I created.
I accidentally deleted the branch in a repository browser. How do I restore the branch? Is there a way to undo the most recent commit for the whole repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
如果您使用 TortoiseSVN,这里有一个解决方案:
Here is a solution if you are using TortoiseSVN:
使用:
例如:
其中1993是删除前的修订版...
这里是一些很好的文档...
必须有某种方法可以转义用户名中的
@
符号...Use:
For example:
Where 1993 is the revision before the delete...
Here is some good documentation...
There must be some way of escaping the
@
symbol in the username...假设您的最后修订版本是 108:
您还可以将源 URL 添加到合并中:
Stack Overflow 上的其他位置:
撤消 TortoiseSVN 中的提交
Assuming your last revision was 108:
You can also add your source URL to the merge:
Elsewhere on Stack Overflow:
Undoing a commit in TortoiseSVN
我遇到了这个问题,但上面的命令对我不起作用。做什么就容易多了。在删除分支之前,我在一次修订中检查了该分支。
被删除的版本是 9331。我在 9330 上检查了它:
这是我想要的简单解决方案。
I ran into this problem, but the above command didn't work for me. What did was much easier. I checked out the branch at one revision before I removed it.
The revision that was removed was 9331. I checked it out at 9330:
That was the easy solution I wanted.
这对我有用,
This worked for me,
或者,如果是单个提交删除了分支:
恢复提交,然后提交
Alternatively, if it was a single commit that deleted the branch:
Revert the commit and then commit
我遇到了同样的问题,并在 SmartSVN (Enterprise 6.0.2) 中以这种方式解决了它:
I ran into the same problem and solved it this way in SmartSVN (Enterprise 6.0.2):