4 ms·
I tried checking in all dependencies for one of my projects a while ago, and my git history quickly became ridiculously bloated as I added/upgraded/replaced mor
by lewisl9029 11y ago
I tried checking in all dependencies for one of my projects a while ago, and my git history quickly became ridiculously bloated as I added/upgraded/replaced more and more dependencies as time went on.
For those who go this route, any advice on what you can do to keep your version control history from blowing up?
- wlesieutre 11y agoGit submodules maybe? https://git-scm.com/docs/git-submodule https://git-scm.com/docs/git-submodule
- lewisl9029 11y agoAhh... That must be what I was missing. So instead of checking in your dependencies into your app repo directly, you turn your dependencies folders into submodules to keep their histories separate from your app repo's history. Makes sense! I'll be sure to give that a try on my next project.
- wlesieutre 11y agoI've only made some small contributions to a project that used them and haven't set them up myself. But yeah, that's my understanding of it. There's a bit of extra overhead because you have to fetch them separately after cloning a repo, and updating them is separate from pulling origin/master. If you do one without the other you can probably get into unexpected version mismatches where your project doesn't play nicely with the dependencies.