首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能使用git SVN推送到svn回购。

不能使用git SVN推送到svn回购。
EN

Stack Overflow用户
提问于 2016-12-09 12:52:34
回答 1查看 616关注 0票数 0

我将向SVN推进新的更改,它在上一次git svn dcommit之后没有修改。我有4提交在我的本地版本,自从上次推动回购。现在,当再次尝试执行git svn dcommit时,我总是会遇到这样的错误:

代码语言:javascript
复制
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.

没有任何关于冲突的信息。git svn rebase返回:

代码语言:javascript
复制
Current branch svn-3 is up to date.

为什么会发生这种事,我怎么才能解决呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-12-09 15:26:09

我可以用接下来的步骤修复这个奇怪的错误:

  1. git reset --soft refs/remotes/git-svn将本地回购的状态返回到最后一次成功提交,该提交已更新为远程SVN。
  2. git reflog show中,我们可以找到包含实际更改的最后一个工作提交(它的散列),并使用git checkout再次应用它们,然后再提交它们。

之后,我成功地完成了git svn dcommit,没有任何错误。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41060948

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档