撤消 SVN 删除 ./* --force
我没有意识到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
不。
除非它们仍在被其他应用程序使用,否则抱歉。
Nope.
Not unless they're still in use by some other application, sorry.
您不能在新目录中再次检查您正在工作的内容吗? 如果您有任何未进行版本控制的更改,您就是 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.
转到文件目录,
将恢复本地已删除但尚未提交但已受版本控制的任何文件。
Going to the file directory,
will restore any file locally deleted, yet not committed, but already under version controlled.
根据您的 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"
如果您在 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.
您已使用“svn delete”命令并删除了本地副本。 这意味着文件的原始版本仍然存在于 SVN 历史记录中。 “svn delete”不会从存储库中删除文件的历史记录。 您可以通过以下方式恢复最新版本:
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
svn checkout --revision
您运行命令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