warning: refname 'xxx' is ambiguous when using git-svn

后端 未结 4 1158
故里飘歌
故里飘歌 2020-12-28 11:40

I am using git as a frontend to Subversion (via git svn).

So, for every svn trunk/branch I have remote branch in git named \"remotes/xxx\". For example \"remotes/tru

4条回答
  •  甜味超标
    2020-12-28 12:43

    If you pass the --prefix=svn/ flag to the git svn clone command, then all of the Subversion branches would be named like remotes/svn/branchname. If this is acceptable to you, it fixes the "refname is ambiguous" warning. It also gives you a nice way of referring to the remote svn branches, as in for instance if you want to create a local tracking branch it would be something like:

    $ git checkout -b branchname svn/branchname

    The local branch then has the same name as the remote svn branch, and no ambiguous refname problem.

提交回复
热议问题