撤消 SVN 删除 ./* --force

发布于 2024-07-17 04:59:02 字数 232 浏览 12 评论 0原文

我没有意识到 svn delete 会删除我的本地副本,我只是想将其从存储库中删除。 现在我的所有文件都消失了,而且它们也不在垃圾箱中。 有什么办法可以恢复它们吗?


我应该澄清一下,这些文件从未进入存储库。 我试图删除存储库中的一些旧垃圾,以便我可以签入它们。

我在 ext3 文件系统上运行 Ubuntu。 不过没关系……我在大约 2 小时内成功重做了我删除的内容。

I didn't realize svn delete would delete my local copy, I just wanted it out of the repository. Now all my files are gone, and they aren't in the trash bin either. Is there any way I can recover them?


I should clarify, these files never made it into the repository. I was trying to get rid of some old junk in the repository so that I could check these in.

I'm running Ubuntu on an ext3 filesystem. It's okay though.... I managed to redo what I deleted in about 2 hours.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

诗化ㄋ丶相逢 2024-07-24 04:59:02

不。

除非它们仍在被其他应用程序使用,否则抱歉。

Nope.

Not unless they're still in use by some other application, sorry.

韵柒 2024-07-24 04:59:02

您不能在新目录中再次检查您正在工作的内容吗? 如果您有任何未进行版本控制的更改,您就是 SOL,其他任何内容您都可以通过 svn 恢复到存储库中的最新版本。

Can't you just check out whatever you were working again in a new directory? If you had any changes that were not versioned you are SOL, anything else you can just svn revert to the latest version in the repository.

假面具 2024-07-24 04:59:02

转到文件目录,

svn revert "filename"

将恢复本地已删除但尚未提交但已受版本控制的任何文件。

Going to the file directory,

svn revert "filename"

will restore any file locally deleted, yet not committed, but already under version controlled.

孤寂小茶 2024-07-24 04:59:02

根据您的 SVN 客户端,您应该能够使用 Tortoise 中的“显示日志”从以前的版本中获取这些文件...

只需打开日志,找到该文件仍然存在的版本,然后“恢复到此版本”

Depending on your SVN client you should be able to get these files from a previous revision using "Show Log" as its called in Tortoise...

Just open the log find a revision where that file was still there and "revert to this revision"

不乱于心 2024-07-24 04:59:02

如果您在 Windows 下,可以查看(部分)免费工具名称 零假设恢复
当您在 Windows 上删除文件时真的很有帮助!

或者,如果您启用了它并且使用的是 vista,您可以在文件夹的属性中检查文件夹的“以前版本”。

希望能帮助到你! 祝你好运。

If you're under windows, you can check the (partially) free tool name zero assumption recovery.
Really helps when you deleted files on windows!

Or else if you have it enabled and you're using vista you can check the "previous versions" of your folder in the properties of it.

hope it helps! good luck.

拒绝两难 2024-07-24 04:59:02

您已使用“svn delete”命令并删除了本地副本。 这意味着文件的原始版本仍然存在于 SVN 历史记录中。 “svn delete”不会从存储库中删除文件的历史记录。 您可以通过以下方式恢复最新版本:

  1. 检查SVN日志并找出“删除操作”的修订号。
  2. 在“删除操作”之前使用“svn checkout”检查修订版本。 (例如,如果删除操作的修订号是100,则查看修订号99)
    svn checkout --修订

You have used 'svn delete' command and deleted local copy. It means original versions of files still exist in SVN history. 'svn delete' doesnot delete history of file from the repository. You can recover the last version in following way

  1. Check the SVN Log and find out the revision number of 'delete operation'.
  2. Use 'svn checkout' to check the revision just before the 'delete operation'. (e.g. if revision number of delete operation is 100, check out the revision number 99)
    svn checkout --revision
甩你一脸翔 2024-07-24 04:59:02

您运行命令svn log并获取不愉快删除的修订号。
然后运行 ​​svn merge -r2572:2571 svn://$PATH_WHERE_YOU_DELETED_NUMBER_WAS_ON_SVN_SERVER &LOCAL_PATH_WHERE_TO_SAVE_FILE

其中 -r 是修订号

示例
合并-r2572:2571 svn://www.jane16.com/var/opt/svn/mypoject/Start.java C:/eclipse/workspace/myporject/Start.java

You run command svn log and get the revision number of the unhappy deletion.
then run svn merge -r2572:2571 svn://$PATH_WHERE_YOU_DELETED_NUMBER_WAS_ON_SVN_SERVER &LOCAL_PATH_WHERE_TO_SAVE_FILE

where -r are the revision numbers

example
merge -r2572:2571 svn://www.jane16.com/var/opt/svn/mypoject/Start.java C:/ecplipse/workspace/myporject/Start.java

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文