At work, we're working on a dozen Java OSGi bundles, each of which has its own git repository. All bundles will be, in the long run, pretty independent from each other, which justifies the individual repositories — although right now we're still often modifying several of them at the same time.
When we make a product release (which consists of all bundles), a new branch is created in each bundle, which is a bit of a pain. We were thus thinking about using git-submodule to ease the pain (something like git submodule foreach <cmd>
).
So, our desired setup would be a master project Product
, and submodules for each bundle:
Project/
BundleA/
BundleB/
BundleC/
Now, I've spent several hours reading all I could find about submodules, and I understood that if I modify things in BundleA
, I have to commit in BundleA
, push, then commit the submodule change in Project
and push again.
This clearly sounds like it was not how git-submodule was designed to be used in the first place. Is it against best practices to use it like this? Or does it sound like a case where an alternative would be preferred?
- bare-bones git-submodule usage
- using an existing “git wrapper”:
- write my own simple bash scripts to batch process the OSGi bundles
Any other suggestion welcome.