我用乌龟svn。我添加了一个文件夹并将其提交到 subversion repo。然后,我的同事做了一些事情,犯了一个错误,并删除了整个文件夹并要求我重新提交工作文件。
但是现在,当我单击 tortoise svn-> commit 时,它说“没有文件被更改或添加”。随着整个文件夹消失,服务器存储库中的文件不再存在。
如果我单击更新,它将删除我的本地文件夹,我不希望这样。我想要的是将本地文件夹中的所有内容重新提交回仓库。我怎么做?
谢谢。
我用乌龟svn。我添加了一个文件夹并将其提交到 subversion repo。然后,我的同事做了一些事情,犯了一个错误,并删除了整个文件夹并要求我重新提交工作文件。
但是现在,当我单击 tortoise svn-> commit 时,它说“没有文件被更改或添加”。随着整个文件夹消失,服务器存储库中的文件不再存在。
如果我单击更新,它将删除我的本地文件夹,我不希望这样。我想要的是将本地文件夹中的所有内容重新提交回仓库。我怎么做?
谢谢。
You need to revert the changes that your coworker did.
First, backup the deleted folder. Now update the parent directory of the folder. Then go to the parent folder -> right click on it -> 'Show log' -> find the entry for the changes that your coworker did -> right click on it -> 'Revert changes from this revision'. Check in your working copy that the directory is back.
Now copy changed files (if any) from backup, do not forget to svn add
new files (if any). Commit your directory only (otherwise other changes your coworker did will be also reverted). Now right click on parent folder -> 'Revert' (this will restore back your co-worker's modifications that have nothing to do with the deleted folder).
By the way, it is important to understand what reverting committed changes does: it applies changes from the commit being reverted 'backwards' to your working copy. So the revision/commit does not disappear from the repository.
好吧,您可以将本地文件夹复制到其他地方,更新,然后将文件夹移回将其添加到颠覆并提交(并用棍子打您的同事)
您只需将更改提交到新分支即可。
如果你不想切换你的主开发。到一个新分支,只需执行以下操作:
您需要将文件“添加”到提交中(svn add
如果您使用的是 svn 的终端版本)。Tortoise svn 中应该有一个命令可以做到这一点。
Assuming your coworker didn't just delete the directory, but moved it or created another directory in some other location, you could use 'svn switch' (or the tortoise equivalent) to re-point your current working copy to the new repository location. After that you can safely commit again.