DEV Community

Discussion on: Is Git Great? #healthydebate

 
ecyrbe profile image
ecyrbe

I do not agree with nathan here.
I use submodules heavily on some projects.

The issue with submodules is that people do not understand how to handle it. Submodules are just references to your git submodule HEAD at the time of commit of your parent module.

Do not try to commit submodules HEAD on your parent repository when you push commits on your submodules. it makes no sense, you'll waste time and effort for nothing.

Just commit your submodules HEAD on parent repository when you add or remove new submodules. Or when you want to tag a global new version of your project.
You can take a look at submodules done right on deno project.