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

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

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