Git - Checkout特定的提升版本失败(“不是git存储库”)

时间:2017-11-24 15:37:00

标签: git boost window git-submodules

我想在我的本地构建系统中集成boost。这个想法是自动检索特定版本的boost并构建它。为了提高速度,我想保留boost存储库的本地缓存。因此,步骤将是:

  1. 克隆或获取已克隆的最新结果
  2. 查看所请求的版本
  3. 构建,复制,......
  4. 步骤1和2基本上归结为以下git命令

    git clone --recursive -c core.longpaths=true -j 20 https://github.com/boostorg/boost.git .
    git checkout --recurse-submodules tags/boost-1.65.1
    

    克隆本身工作正常,但结帐失败并显示以下消息

    fatal: Not a git repository: ../../.git/modules/libs/hana
    fatal: Not a git repository: ../../.git/modules/libs/metaparse
    Note: checking out 'tags/boost-1.65.1'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b <new-branch-name>
    
    HEAD is now at 436ad1dfc... Revert accidental submodule changes  in last commit
    M       libs/hana
    M       libs/metaparse
    

    这是在带有git 2.15.0

    的Windows 7系统上

    修改

    我还尝试将存储库放在一个简短的目录树中,并删除了core.longpaths标志。同样的问题......

0 个答案:

没有答案