2014-01-09 103 views
1

我在Windows上使用git-svn repo,使用msysgit 1.8.5。这里是我的.git/config在git中创建分支时出错

[core] 
    repositoryformatversion = 0 
    filemode = false 
    bare = false 
    logallrefupdates = true 
    symlinks = false 
    ignorecase = true 
    hideDotFiles = dotGitOnly 
[svn-remote "svn"] 
    url = https://svn.domain.com:8443/svn 
    fetch = trunk:refs/remotes/trunk 
    branches = branches/{BR_4_1_4}:refs/remotes/branches/* 

我的分支机构名单:

$ git branch -a 
    BR_4_1_4 
* trunk 
    remotes/branches/BR_4_1_4 
    remotes/trunk 

我想创建过的trunk命名trunk_work一个分支,所以我发出以下命令(你也可以看到后续错误):

$ git branch trunk_work 
warning: refname 'trunk' is ambiguous. 
fatal: Ambiguous object name: 'trunk'. 

任何想法为什么这是失败?我谷歌搜索了一下,但没有看到任何具体的问题。提前致谢。

+0

http://stackoverflow.com/a/12225704/703229 – Sam

+0

@SamSullivan我不会创建一个标签,我想创建一个分支一个完全不同的名称。不知道你期望我找到什么... –

+1

潜在的帮助:http://stackoverflow.com/questions/4644380/git-warning-refname-xxx-is-ambiguous(第二高率的答案可能至少给出一个解决方法)。 – Chris

回答

1

我在评论中提到的,我认为你可以使用这个答案给出的解决方案可能解决您的问题:Git: warning: refname 'xxx' is ambiguous when using git-svn

我认为第二个收视率最高的答案可能是你最感兴趣的一个:

git config --global core.warnambiguousrefs false 

虽然它也长得很像,从这些评论中,specifiying分支格式heads/trunk(如果这就是你所感兴趣的一个),可以做的工作。

有些文档:Git config