Hacker News new | ask | show | jobs
by c03 1943 days ago
Both --recursive not being default and then using --recurse-submodules when pulling are my top annoyances in git.
3 comments

Another tip: you can do a deep clone of the main repo, then do `git submodule update --init --recursive --depth=1` to just pull the heads of your dependencies to cut down on times. Especially useful if you don't work within the submodules at all.
IMO this should be the default!
No. History is the whole point of git. It would be antithetical to make this the default.

I'm more on board with the recursive options, though.

I can't for the life of me understand why this isn't at least a config option. That and an option for setting --upstream in git push by default. Those could at least preserve backwards compatibility.

Are the Git maintainers so stringent on maintaining backwards compatibility that the implementation of submodules has remained in such a dire state for so long? I find it hard to believe that a VCS this widely adopted would fall over so easily for this relatively popular use case.

You can now set it for pull but not for clone.

    git config --global submodule.recurse true
At the very least, it could warn you when you pull a repo with submodules without —recurse-submodules. But it doesn’t, it just silently does nothing.