Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在git中创建分支时出错_Git_Msysgit - Fatal编程技术网

在git中创建分支时出错

在git中创建分支时出错,git,msysgit,Git,Msysgit,我在Windows上使用git svn repo,使用msysgit 1.8.5。这是我的.git/config: [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [svn-remote "s

我在Windows上使用git svn repo,使用msysgit 1.8.5。这是我的
.git/config

[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\u work
的分支,因此我发出以下命令(您还可以看到后续错误):


知道为什么会失败吗?我在谷歌上搜索了一下,但没有看到任何与这个问题相关的东西。提前感谢。

我在评论中提到,我认为您可以使用以下答案中给出的解决方案来解决您的问题:

我认为排名第二的答案可能是你最感兴趣的答案:

git config --global core.warnambiguousrefs false
尽管从这些评论来看,以
heads/trunk
格式指定分支机构(如果您感兴趣的话)也可以完成这项工作


一些文档:

@SamSullivan我不是在创建标记,我在尝试创建一个具有完全不同名称的分支。不确定你期望我发现什么…潜在的帮助:(第二高比率的答案至少可以提供一个解决办法)。@Chris Perfect!如果你发布一个答案,我会给你一个绿色的复选标记!谢谢可以,尽管从技术上讲我的答案不是D
git config --global core.warnambiguousrefs false