Hacker News new | ask | show | jobs
by rubyist5eva 1913 days ago
If you get to a point where you think you absoultely need git submodules...just switch to svn, so much pain in misery can be avoided if you just use the right tool for the right job and SVN handles the git submodule use-case effortlessly (for C++ at least).

For languages with proper package management (ruby, python, go, node, etc...) put in the extra effort to utilize your package manager to update your dependencies instead of bothering with submodules. If you're still set on doing submodules, I'm willing to be you're just "doing it wrong" (TM).

2 comments

Unfortunately "just switch to svn" is easier said than done and likely to cause more headaches than dealing with git submodules.
Why?

Subversion is way easier to use than git, and it takes minutes to setup a server. Pushing your project history is just a few steps with git-svn, though it may take a while depending on the size of your project.

TortoiseSVN is probably the most straightforward and easy to use version control GUI there is.

My point is that it's easier to manage and maintain a single version control system.

> Subversion is way easier to use than git

That's subjective, I'm more familiar with git thus it's easier for me.

> and it takes minutes to setup a server.

Git doesn't even require a server to use. You can create local repos, you can pull/push to remote repos via SSH/HTTPS/etc. No specialized server software needed.

> TortoiseSVN

TortoiseGIT. (Though I prefer headless)

Are you suggesting Svn with externals? If so how is it better than Git and submodules?

(Having used both I'd say I dislike both equally.)

I mean just having all your dependencies in a mono repo and vendoring the correct version your application depends on.
If that's all you want, you can absolutely use git as a monorepo, and you can check in vendored dependencies just as easily.

The main downside (and I admit it can be a big one) to a git monorepo (vs. svn) is that you can't check out a subtree all that easily.

(I do agree with the parent that svn externals is a lot more seamless than git submodules, though.)