I'm trying to transition my cvs repository to git and have been stuck on this last issue for a while.
I currently use CVS ampersand modules to share code between projets. Those allow you to basically "alias" a different repository as a subdirectory in your project, so you can update / commit the whole project and it's included remote repositories as if it was one repository.
I've seen threads that recommend subtree merges or submodules for doing this, in reference to (svn:externals). This won't work because:
subtree merges apparently don't allow you to easily push back / update the external repos.
submodules still require you to manually push / pull every submodule. I have a large number of submodules and going into every single one to push my changes would be tedious and could lead to omissions as changes would forget to be committed.
Just to be clear, I would like to have a git repository that contains other git repositories as subdirectories, and be able to commit / push / pull to all of them at the same time with one command.
That's very much un-git. If they are separate projects, they belong in separate repositories.
However, the repo tool is used by projects such as Android to provide a layer above git that encompasses a large number of dependent projects which may come from different locations and allows you to have a workflow from local branching of all of them through revision control (which may go to different locations by project).
It's a layer up and if you're expecting the exact git experience, you'll not get that. You can use your standard git tools in any subproject, but at the top level, you're using a different tool for the coordination.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With