如何使用git-svn从不需要的重命名中恢复:"事务已过期"

iwe*_*ein 10 git-svn

我正在使用git-svn.我已将文件'A'移动到'B',并且我最近使用了svn HEAD(使用git svn rebase).我可以毫无问题地提交所有其他更改.现在我已经决定将'B'移回'A'并提交更改.

当我执行移动并提交给我的本地主人时,它工作正常,但在执行以下操作时我得到以下内容git svn dcommit:

Transaction is out of date: Out of date: 'A' in transaction '3652-1' at /opt/local/libexec/git-core/git-svn line 570
Run Code Online (Sandbox Code Playgroud)

所以我尝试在单独的提交中复制和删除导致:

Item already exists in filesystem: File already exists: filesystem '/usr/svn/db', transaction '3652-1', path 'A' at /opt/local/libexec/git-core/git-svn line 4735
Run Code Online (Sandbox Code Playgroud)

通过使用文档中描述的解决方法,我使用普通的svn恢复了这种情况,但我不知道如何使用git-svn进行恢复.发生了什么,我该如何解决?

Upg*_*ave 8

删除.git/svn对我不起作用.相反,这是我解决的方式:

  • 从存储库中删除了有问题的目录(但我不确定这是否必要.事后我觉得我可以跳过这一步)
  • git svn rebase
  • 在rebase期间,有一些冲突.对于每个冲突,我在文本编辑器中解决了冲突,然后使用git add <file-in-conflict>然后git rebase --continue
  • rebase成功完成后,git svn dcommit运行成功!