re: Git Submodules Revisited VIEW POST


What I've seen most about git submodules is that people expect them to have a behavior that doesn't match Git one.
A submodule is a git repo in a git repo, plain, simple.
You want a specific version of this dependency: just "git checkout".
You want a version by tag, create the tag, and "git checkout".
You made fixes in the main project AND in the dependency:

  • dependency repo: git commit, git push
  • main repo: git commit, git push

...exactly what you "should" do if the dependency repo was separated...

I don't get what people find so hard to work with...

For us, the problem wasn't when committing individual dependencies, it was when trying to track along branches sanely.

But in more general terms, while I know that git submodule works more or less like there's just a totally independent checkout underneath, that is the problem most people have - the feeling that it's a bolted-on feature rather than properly integrated.

Can you elaborate on "properly integrated" I fail to see the need that Git submodule doesn't provide.
..and I'd like to know ;)

code of conduct - report abuse