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

2020-03-12 14:32:06 +08:00
 XiLemon

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 上也慢很多。

2521 次点击
所在节点    程序员
11 条回复
learningman
2020-03-12 15:39:33 +08:00
你确定不是 git 没走代理吗。。。
XiLemon
2020-03-12 16:03:00 +08:00
@learningman #1 额,公司的项目,Windows10 在内网,MBP 在家里呢。。。
Opportunity
2020-03-12 17:01:43 +08:00
·git status` 也慢的话,是不是应该考虑硬盘的问题了
XiLemon
2020-03-12 17:23:47 +08:00
@Opportunity Windows10 机器上的固态应该还没到退休的时候吧😂,看其他同事执行起来也挺慢的。。。
MonoLogueChi
2020-03-12 18:29:41 +08:00
别用 git bash 试试看,用 powershell 或者 cmd,git bash 有的时候会有各种奇奇怪怪的问题,比如 commit 10 分钟还没跑完,git clone 没速度,这些我都遇到过
XiLemon
2020-03-12 18:31:50 +08:00
@MonoLogueChi 用的就是 Git Bash,PowerShell 没试过呢
maichael
2020-03-12 19:29:52 +08:00
sikong31
2020-03-12 19:49:59 +08:00
git bash clone 的时候经常抽风,换 cmd/powershell 立马就好了
hantsy
2020-03-12 20:05:24 +08:00
@sikong31 理论 Git bash 好些,毕竟 Git Windows 依赖 mingw64,不完全是原生的程序。
XiLemon
2020-03-13 09:18:35 +08:00
@maichael 谢谢,好像没啥用😂
XiLemon
2020-03-13 09:19:09 +08:00
@sikong31 CMD 也试过了,感觉更新 submodule 一样慢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/652173

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX