我在上一篇文章中过早地谈到了破坏事物的问题。
我尝试使用命令 svn update -r 1124
恢复到修订版 1124,但我不断收到如下错误消息:
[prague]$ svn update -r1024
U app/webroot/css/group_themes/green.css
U app/webroot/css/style.css
Skipped 'app/webroot/index.php'
svn: Failed to add directory 'app/webroot/images/users': an unversioned directory of the same name already exists
我们备份了一些内容,但仍然不是我昨晚检查过的确切版本...我认为恢复到特定版本会容易得多:(
最佳答案
没有提交
尝试在新的空目录中 checkout 修订版 1124,这样就不会与现有目录发生冲突。
因此,在新目录中执行 svn checkout -r 1124
。
提交
根据svn手册,如果你想提交以前的修订,你需要使用反向合并。请参阅http://svnbook.red-bean.com/en/1.0/ch04s04.html ,“撤消更改”。
svn merge -c -1124 http://svn.example.com/repos/calc/trunk
随后是
svn commit -m“回滚合并到修订版 1124”
关于svn - 如何使用命令行 SVN 强制恢复特定版本号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5165114/