2 ms·
You're not caching anything by checking it in git, you're mirroring it (very poorly). Your filesystem caches it; you still rely on your remote to download it.
by scrollaway 9y ago
You're not caching anything by checking it in git, you're mirroring it (very poorly). Your filesystem caches it; you still rely on your remote to download it.
If you want to mirror your dependencies, run an npm mirror subset or something. If that sounds crazy to you, that's because mirroring npm dependencies is unnecessary for virtually everybody.
Oh, and you are also making your .git folder 100x larger than it otherwise would be, making your initial download and on-disk sizes a lot bigger, which can also slow down other git operations. Not to mention the atrocious amount of noise whenever someone does a git blame, git log, git log -S, ...
In other words, checking in your entire dependency source tree in git is unnecessary, wasteful and annoying in the best case scenario.