Can not push to the SVN repo using git svn

时间:2016-12-09 12:52:34

标签: git git-svn

I'm going to push new changes to the SVN repo, which was not modified after the last git svn dcommit. I have 4 commits on top in my local version since the last push to the repo. And now I'm always getting this error, when trying to do git svn dcommit again:

ERROR from SVN:
Connection reset by peer: Can't read from connection: Connection reset by peer
W: 30d2c8bdab2d4cdd860b6ba1b45db55967232d1c and refs/remotes/git-svn differ, using rebase:
:040000 040000 bcb0b926dcd6608b8f243578e44ff0ab32457e32 2040ef070e43df814825c9a9c7708741a3395c9a M  android
:040000 040000 d453457cac2fd97f7ff92bfa849f73edb19ab41d 5b8dd84f1bcf9d136cd410c238750965b3615787 M  ios
Current branch svn-3 is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.

There are no any messages about conflicts. git svn rebase returns:

Current branch svn-3 is up to date.

Why does this happen and how can I fix that?

1 个答案:

答案 0 :(得分:0)

我可以使用后续步骤修复这个奇怪的错误:

  1. git reset --soft refs/remotes/git-svn将本地repo的状态返​​回到上次成功提交,该提交已更新为远程SVN repo。

  2. 查看git reflog show我们可以找到最后一次工作提交(其哈希值)并进行实际更改,然后使用git checkout再次应用它们,然后再次提交它们。

  3. 之后我能够成功git svn dcommit成功而没有任何错误。