In general : Whenever we want to integrate separate decoupled components with distinct lifecycles I recommend submodules over repo, but their implementation must come with proper education regarding the special workflow they require. Nondeterministic relationship definition (each repo version can be defined as a floating head) Requires an extra repository for management.ģ. Tracking synchronized development effort is easier.Ģ. Need for additional commands (‘clone recursive’ and ‘submodule update’)Ĥ. Developers get confused if they don’t understand the inner mechanics.ģ. (Need separate clones to introduce changes in submodules)Ģ. Total separation of lifecycles between the parent and the submodules.ġ. Easy to recreate historical configurations.ĥ. Integration points are recorded in parent repo.Ĥ. Deterministic relationship definition (parent project always points to a specific commit in submodule)ģ. An integrated solution, part of git since v1.5Ģ. Still - sometimes this is not an optimal solution, especially if you do a lot of feature branch development (which in itself is an antipattern in classical Continuous Delivery approach – see herefor example).įor these cases we stick to the following guidelines. You can learn more from the Google cloud architect certification. : packaging components to jars, npms, eggs, rpms or docker images, uploading to a binary repo and pulling in as versioned dependencies during the build. This post summarizes the general rules of thumb we at Otomato follow when choosing a solution for this admittedly nontrivial situation.įirst of all – whenever possible - we recommend integrating your components on binary package level rather than compiling everything from source each time. There are a lot of articles on the internet bashing each of the tools, but in our opinion most of it comes from misunderstanding the tool’s design or trying to apply it in an unappropriate context. google repo tool to manage multi-repository integrations in git. You can also change the commit that is checked out in each submodule by performing a checkout in the submodule repository and then committing the change in the parent repository.I was recently asked by a customer to outline the pros and cons of using git submodules vs. This is common when you are experimenting with different checked out branches or tags in the submodule and you want to restore it back to the commit tracked by the parent repository. Performing a submodule update is also useful when you want to restore your submodule’s repository to the current commit tracked by the parent repository. You would then fetch the latest changes in the submodule’s Git repository and perform a submodule update to check out the current revision referenced in the parent repository. You commonly perform this task after you pull a change in the parent repository that updates the revision checked out in the submodule. Performing a submodule update checks out that specific revision in the submodule’s Git repository. In this case the Git parent repository tracks the commit that should be checked out in each configured submodule. Alternatively to the tracking of a branch, you can also control which commit of the submodule should be used.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |