Live data from Hacker News

I Hate Git Submodules

abildskov.io

1–10 of 73 posts

Re: I Hate Git Submodules

#5

What do people think of git subtrees? https://codewinsarguments.co/2016/05/01/git-submodules-vs-gi... Or the non-standard git-subrepo? https://github.com/ingydotnet/git-subrepo

I came here to recommend subtrees. They're pretty good.

Re: I Hate Git Submodules

#9
post #6

then don't use them?

> Spoiler alert. I do not hate submodules. I do how ever have an instant oh oh response when people mention they want to solve a problem with Git submodules. First line of the article explains the title.

> Why I hate submodules.

> Spoiler alert. I do not hate submodules.

Clickbait much? Make up your mind?

Re: I Hate Git Submodules

#10
It believe it is a question of maturity. If the subcomponent is mature enough, then turning it into a package is fine. The cost is that patching the subcomponent and testing the main component takes more effort (though you can script it). With submodules at least the build and test cycle is as quick as if it is in the same repo.

So there is a scale from quicker iteration to less coupled: same repo, submodule, different package. The question is in which cases the middle step "submodule" is worth it or if you should rather switch to one of the others always.

Post reply on HN