git-svn fetch并没有在最新版本中使用 [英] git-svn fetch isn't pulling in the latest versions

查看:134
本文介绍了git-svn fetch并没有在最新版本中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行


git svn fetch



从我的存储库中返回,它不会返回任何内容,即使在svn下有新的提交

  [root]#svn log -l 1 http://example.com/trunk/client-resources/resource-pa 
r12958 | ing | 2011-08-22 18:29:57 -0500(2011年8月22日星期一)| 1行
SRGENERAL-1468为pa
添加更多数组[root]#git-svn fetch
[root]#git log -1
commit be19ae4c7d1a3c3da6dd90389aebd6d76792cc71
作者: sltin< sltin @ 44b83e5a-25ef-0310-8dbe-eeaaa4f92a64>
日期:Wed Jun 22 14:30:53 2011 +0000

修复类路径。

git-svn-id:http://example.com/trunk/client-resources/resource-common@12406 44b83e5a-25ef-0310-8dbe -ee0aa4f92a64

请注意版本差异。 svn日志列表12958和git日志列出了最新的
svn版本为12406.



我可以重置为12406,然后重新获取:

  [root]#git svn reset 12406 
r12406 = be19ae4c7d1a3c3da6dd90389aebd6d76792cc71(refs / remotes / git-svn)
[root]#git svn fetch
M src / test / java / csl / resource / ioc / AbstractResourceIocTest.java
r12977 = 1b21f560b0354b28fe1a272d7723b1e6fa90a99c(refs / remotes / git-svn)
M src /test/java/csl/resource/ioc/AbstractResourceIocTest.java
r12978 = bf22ea0151a364eb1ca1af37a7a907d5b5cc7420(refs / remotes / git-svn)
M src / test / java / csl / resource / ioc / AbstractResourceIocTest.java
r12987 = ce922c2eae07f6c12dbbd4175a9c61055b563ee3(refs / remotes / git-svn)

当我检查日志版本,它们没有变化。



如何让git-svn从svn获取最新版本?



<强>电子我找到了答案,svn数据被加载到一个不活动的线程中,这个线程通常会合并到活动分支中,不存在于裸仓库中。我试图重置,但也需要一个活动的分支。最终的答案是:

$ g $ g $ git reset --soft refs / remotes / git-svn

$ g $ g $ git reset --soft refs / remotes / git-svn


When I execute a

git svn fetch

from my repository, it returns nothing and doesn't update even though there are new commits under svn.

[root]# svn log -l 1  http://example.com/trunk/client-resources/resource-pa
    r12958 | ing | 2011-08-22 18:29:57 -0500 (Mon, 22 Aug 2011) | 1 line
    SRGENERAL-1468 adding more arrays for pa
[root]# git-svn fetch
[root]# git log -1
    commit be19ae4c7d1a3c3da6dd90389aebd6d76792cc71
    Author: sltin <sltin@44b83e5a-25ef-0310-8dbe-ee0aa4f92a64>
    Date:   Wed Jun 22 14:30:53 2011 +0000

    Fixing the classpath.

    git-svn-id: http://example.com/trunk/client-resources/resource-common@12406 44b83e5a-25ef-0310-8dbe-ee0aa4f92a64

Note the version differences. The svn log lists 12958 and the git log lists the latest svn version as 12406.

I can do a reset to 12406 and then a new fetch:

[root]# git svn reset 12406
    r12406 = be19ae4c7d1a3c3da6dd90389aebd6d76792cc71 (refs/remotes/git-svn)
[root]# git svn fetch
        M       src/test/java/csl/resource/ioc/AbstractResourceIocTest.java
    r12977 = 1b21f560b0354b28fe1a272d7723b1e6fa90a99c (refs/remotes/git-svn)
        M       src/test/java/csl/resource/ioc/AbstractResourceIocTest.java
    r12978 = bf22ea0151a364eb1ca1af37a7a907d5b5cc7420 (refs/remotes/git-svn)
        M       src/test/java/csl/resource/ioc/AbstractResourceIocTest.java
    r12987 = ce922c2eae07f6c12dbbd4175a9c61055b563ee3 (refs/remotes/git-svn)

And when I check the log versions, they are unchanged.

How do I get git-svn to pull in the latest versions from svn?

Edit:

I found the answer, the svn data is loaded in to an inactive thread that would normally be merged in to the active branch, which doesn't exist in a bare repository. I tried to do a reset, but that needs an active branch too. The final answer was:

git reset --soft refs/remotes/git-svn

解决方案

I found the answer, the svn data is loaded in to an inactive thread that would normally be merged in to the active branch, which doesn't exist in a bare repository. I tried to do a reset, but that needs an active branch too. The final answer was:

git reset --soft refs/remotes/git-svn

这篇关于git-svn fetch并没有在最新版本中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆