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

git 2.18 win64,签出分支时出现奇怪错误,仅在我的电脑中

git
  •  0
  • JorgeeFG  · 技术社区  · 7 年前

    PS C:\Users\user\Proyectos\GRV\Repos> git clone https://user@bitbucket.xxx.com/scm/in004/site-code.git in004_code
    
    Cloning into 'in004_code'...
    remote: Counting objects: 4034, done.
    remote: Compressing objects: 100% (3565/3565), done.
    remote: Total 4034 (delta 366), reused 4010 (delta 358)
    Receiving objects: 100% (4034/4034), 10.11 MiB | 280.00 KiB/s, done.
    Resolving deltas: 100% (366/366), done.
    Checking out files: 100% (3577/3577), done.
    PS C:\Users\user\Proyectos\GRV\Repos> cd .\in004_code\
    PS C:\Users\user\Proyectos\GRV\Repos\in004_code> git status
    On branch master
    Your branch is up to date with 'origin/master'.
    
    nothing to commit, working tree clean
    PS C:\Users\user\Proyectos\GRV\Repos\in004_code> cat .\.gitmodules
    [submodule "sites/default/files"]
            path = sites/default/files
            url = ../site-files.git
    [submodule "profiles/hub"]
            path = profiles/hub
            url = ../../hub/hub-profile.git
            branch = 0.x
    PS C:\Users\user\Proyectos\GRV\Repos\in004_code> git checkout int
    fatal: bad config line 7 in file C:/Users/user/Proyectos/GRV/Repos/in004_code/.gitmodules
    PS C:\Users\user\Proyectos\GRV\Repos\in004_code> cat .\.gitmodules
    [submodule "sites/default/files"]
            path = sites/default/files
            url = ../site-files.git
    [submodule "profiles/hub"]
            path = profiles/hub
            url = ../../hub/hub-profile.git
    <<<<<<< HEAD
            branch = 0.x
    =======
    >>>>>>> 5580772... Initial commit qa
    PS C:\Users\user\Proyectos\GRV\Repos\in004_code>
    

    有什么帮助吗?

    1 回复  |  直到 7 年前
        1
  •  2
  •   torek    7 年前

    小编辑/更新:默认情况下,查看此错误的特定控件设置为 recurse.submodules ,它是在Git 2.14中引入的。2.14之前的Git版本将忽略任何 recurse.submodules=true git checkout --no-recurse-submodules 清理 git -c recurse.submodules=false checkout ... 应该过去的。我认为失败本身就是出口。 fatal: ...


    许多CentOS发行版附带的Git版本很古老,无法检查错误情况。(你没有说他们使用的是哪个CentOS,也没有显示他们的Git版本,但是请看,例如。, How to install latest version of git on CentOS 7.x/6.x 或者是最近的 Can't clone any repository using git . 对软件的更新保持保守是没有错的,但这是保守的,然后是CentOS…)

    您的实际存储库中有一个错误:a .gitmodules int 分支不是。您的Git是现代的,运行时会立即发现问题 git checkout int .

    他们的枪很古老,所以当你检查 内景 分支在那里,他们的Git悄悄地忽略了这个问题。问题仍然存在 ,你只是没有收到投诉。这个问题需要修理 .gitmodules模块 提交并重新提交 分支)。