|
|
|
|
|
by nrclark
1609 days ago
|
|
Out of curiosity, why the hate for git submodules? They've worked really well for me over the years. They solve the problem of "pin a specific version of some external 3rd-party repo" really nicely. The only complaint I have is that the git-submodule CLI has unintuitive syntax. But this is Git after all, so it's par for the course. :v |
|
And in return, basic operations like merge/rebase start breaking in unintuitive ways.
E.g., I work on repo ss14 that has submodules RobustToolbox, but never modify them in my PR.
I rebase my changes. I have changes in RobustToolbox that are only visible in Git Bash. Other Git clients show no changes... Ofc `git submodules update --recursive` might help or something, but it made a simple operation more complicated.
And that's if I didn't change the submodule. If I did, merging/rebasing becomes its own, separate nightmare.
> They solve the problem of "pin a specific version of some external 3rd-party repo" really
With Cargo/NPM you can pin your dependencies to some version you control like a fork or a local directory, making submodules non-necessary.
And unlike submodules, they don't require you to modify your workflow to sprinkle `git submodule update` everywhere.