svn:如何恢复别人的提交? [英] svn: How to revert somebody else's commit?

查看:40
本文介绍了svn:如何恢复别人的提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

啊,有人(好吧,我的老板)添加并提交了他目录中的所有文件,这意味着所有的 svn 文件:conf/, db/, format, hooks/, locks/...我正在使用 Tortoise,所以我尝试点击每一个并进行还原,它说好的,但我仍然在更新/提交后看到所有这些都在版本控制之下.

Argh, somebody (OK, my boss) added and commited all the files in his directory, meaning all the svn files: conf/, db/, format, hooks/, locks/... I'm using Tortoise, so I tried clicking on each one and doing revert, it said OK, but I still see all of them under version control after update/commit.

我们现在有几个版本.我如何清理东西?谢谢

We are now several versions past that. How do I clean things up ? Thanks

推荐答案

在 Subversion 中,还原"意味着撤销对工作副本的未提交更改.您要做的是(有效地)撤消提交.这通常在 Subversion 中使用 反向合并

In Subversion, "revert" means to undo uncommitted changes to a working copy. What you're looking to do is to (effectively) undo a commit. This is normally done in Subversion with a reverse merge

假设您的老板在一次提交(修订版 REVNUM)中完成所有工作,您只需在工作副本中执行以下操作:

Assuming that your boss did everything in a single commit (revision REVNUM), you'll just do the following in your working copy:

svn merge -c -REVNUM URL_TO_REPOSITORY_LOCATION

然后提交新修订.在 REVNUM 中所做的所有更改将不再在 HEAD 修订版中可见,并且您的修订历史记录将显示已提交的更改,然后再合并回来.

Then commit the new revision. All changes made in REVNUM will no longer be visible in the HEAD revision, and your revision history will show the changes committed, then merged back out.

使用 TortoiseSVN 合并上下文菜单项逐步完成相同的过程.

Use the TortoiseSVN Merge context menu item to step through the same process.

这篇关于svn:如何恢复别人的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆