I like submodules, but I think I’m one of the ten devs in the world that does.
I found something I didn’t know in the article; that --recurse-submodules applies to git grep. However, it doesn’t seem to follow symlinks, so it doesn’t help with my main beef with submodules.
(I kinda use submodules to separate my private and personal infra repos, with too many symlinks.)
As an alternative in some cases, I recently discovered https://josh-project.github.io/josh/, which is yet an alternate way to “combine” repositories, but I found it very pleasant. I also learned that you can use it without a daemon, I wrote a small article about that.
One thing the article doesn’t cover is the WHY of submodules not being updated on a git pull.
At the risk of my sanity, I’d like to know the why. If a colleague updates a submodule to a new SHA, barring any local changes, I would 100% expect the submodule to get updated just like anything else.
Understanding them or not, the UX here remains record-setting levels of awful. Bad to the point of many people going out of their way to avoid them altogether.
I like submodules, but I think I’m one of the ten devs in the world that does.
I found something I didn’t know in the article; that
--recurse-submodulesapplies togit grep. However, it doesn’t seem to follow symlinks, so it doesn’t help with my main beef with submodules.(I kinda use submodules to separate my private and personal infra repos, with too many symlinks.)
As an alternative in some cases, I recently discovered https://josh-project.github.io/josh/, which is yet an alternate way to “combine” repositories, but I found it very pleasant. I also learned that you can use it without a daemon, I wrote a small article about that.
One thing the article doesn’t cover is the WHY of submodules not being updated on a git pull.
At the risk of my sanity, I’d like to know the why. If a colleague updates a submodule to a new SHA, barring any local changes, I would 100% expect the submodule to get updated just like anything else.
Understanding them or not, the UX here remains record-setting levels of awful. Bad to the point of many people going out of their way to avoid them altogether.
Whenever I have encountered them I have found git submodules to be a pain. Despite understanding them I kept getting into frustrating situations.
https://lobste.rs/s/neab1g/never_use_git_submodules