代码之家  ›  专栏  ›  技术社区  ›  agentofuser

开始跟踪仅跟踪主干的Git SVN repo上的分支/标记

  •  8
  • agentofuser  · 技术社区  · 16 年前

    我已经开始用git跟踪SVN存储库,只克隆它的主干目录。现在我想追踪其他的东西,但我不想为了使用而再次克隆它。 --stdlayout 因为下载需要很长时间,而且我已经在本地拥有了大部分代码。如何更改存储库布局以匹配SVN中继/分支/标记方案而无需再次克隆?

    1 回复  |  直到 16 年前
        1
  •  9
  •   ephemient    16 年前

    旧的 .git/config :

    [svn-remote "svn"]
            url = svn://host/project/trunk
            fetch = :refs/remotes/git-svn
    

    新的 git/CONFIG :

    [svn-remote "svn"]
            url = svn://host/project
            fetch = trunk:refs/remotes/git-svn
            branches = branches/*:refs/remotes/*
            tags = tags/*:refs/remotes/tags/*
    

    现在运行 git svn reset -r1 -p; git svn fetch; git svn rebase .

    不,这和做一个 git svn clone 新的——添加分支意味着 git 可以看到更多的合并,这意味着内容 吉特 跟踪有变化吗? git-svn 必须再生一切。