• 请不要在回答技术问题时复制粘贴 AI 生成的内容
XiLemon
V2EX  ›  程序员

求助:怎样提高 Git 在 Windows10 上更新 submodule 的速度

  •  
  •   XiLemon · Mar 12, 2020 · 3082 views
    This topic created in 2340 days ago, the information mentioned may be changed or developed.

    superproject 下面有个很多个管理 protobbuf 的 subproject,现在想要一次性更新所有的 subproject。

    更新命令:

    git submodule update --remote --merge --jobs 8
    

    MBP 上执行只需要一分半钟,Windows10 上面则需要十分钟( Git Bash 中执行的)。

    Git 版本:

    git version 2.21.1 (Apple Git-122.3)
    git version 2.24.1.windows.2
    

    MBP 的网络环境更差一点,毕竟要连 VPN。几次尝试下来,MBP 最多也不超过两分钟就能更新完。

    另外,更新之后执行 git status,Windows10 上也慢很多。

    11 replies    2020-03-13 09:19:09 +08:00
    learningman
        1
    learningman  
       Mar 12, 2020   ❤️ 1
    你确定不是 git 没走代理吗。。。
    XiLemon
        2
    XiLemon  
    OP
       Mar 12, 2020
    @learningman #1 额,公司的项目,Windows10 在内网,MBP 在家里呢。。。
    Opportunity
        3
    Opportunity  
       Mar 12, 2020
    ·git status` 也慢的话,是不是应该考虑硬盘的问题了
    XiLemon
        4
    XiLemon  
    OP
       Mar 12, 2020
    @Opportunity Windows10 机器上的固态应该还没到退休的时候吧😂,看其他同事执行起来也挺慢的。。。
    MonoLogueChi
        5
    MonoLogueChi  
       Mar 12, 2020
    别用 git bash 试试看,用 powershell 或者 cmd,git bash 有的时候会有各种奇奇怪怪的问题,比如 commit 10 分钟还没跑完,git clone 没速度,这些我都遇到过
    XiLemon
        6
    XiLemon  
    OP
       Mar 12, 2020
    @MonoLogueChi 用的就是 Git Bash,PowerShell 没试过呢
    sikong31
        8
    sikong31  
       Mar 12, 2020
    git bash clone 的时候经常抽风,换 cmd/powershell 立马就好了
    hantsy
        9
    hantsy  
       Mar 12, 2020
    @sikong31 理论 Git bash 好些,毕竟 Git Windows 依赖 mingw64,不完全是原生的程序。
    XiLemon
        10
    XiLemon  
    OP
       Mar 13, 2020
    @maichael 谢谢,好像没啥用😂
    XiLemon
        11
    XiLemon  
    OP
       Mar 13, 2020
    @sikong31 CMD 也试过了,感觉更新 submodule 一样慢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2620 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 01:40 · PVG 09:40 · LAX 18:40 · JFK 21:40
    ♥ Do have faith in what you're doing.