如何撤消 svn 更新? [英] How to undo an svn update?

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

问题描述

我修改了工作目录中的文件并进行了 svn 更新.更新是在没有冲突的情况下执行的.

I had modified files in my working directory and did an svn update. The update was performed without conflicts.

我希望能够将工作目录内容恢复到 svn 更新之前的状态.

I would like to be able to revert the working directory content to the state it was just before the svn update.

原因是因为我维护了一个与共享 svn 存储库并行的本地 git 存储库.在执行 svn 更新之前,我忘了 git commit 我的本地更改.现在我的工作目录包含与 svn 更新导致的更改混合的本地更改.如果我提交,所有更改将显示为一个原子更改.我希望他们分开.如果我可以恢复更新并保留我在 svn 更新之前拥有的工作目录的内容,我就可以做到.

The reason is because I maintain a local git repository in parallel to the shared svn repository. I forgot to git commit my local changes before doing the svn update. Now my working directory contains local changes mixed up with changes resulting from the svn update. If I commit, all changes will appear as one atomic change. I wished they would be separate. If I could revert the update and preserve the content of the working directory I had before the svn update, I could do that.

推荐答案

这是不可能的.忘记更新前的状态.

It's not possible. The state before update is forgotten.

您可以通过创建 subversion diff 来分离更改,使用 git apply 将其应用于索引,提交(您的更改),然后提交所有内容(拉取的更改).

You can separate the changes by making subversion diff, using git apply to apply it to index, commit that (your changes) and than commit everything (the changes from pull).

那是紧急解决方案.建议你改用git-svn,以后会帮你处理这类事情.

That is emergency solution. I suggest you switch to git-svn, that will handle this kind of things for you in future.

这篇关于如何撤消 svn 更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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