When setting up a Git repository, one question you have to answer: is it better to set up a large repository gathering all the elements of the application or several specialized repositories?
Before to talk about that, it’s important to note that the answer may depend on the nature of the potential repositories:
- platforms (such as the Web, iOS, Android),
- types (source code, configuration files, tutorials, …).
The advantages of the multi-repository pattern are :
- reducing the size of the repository,
- reducing the risk of uncontrolled or involuntary changes in the code base of teams on other platforms.
The advantages of the single-repository pattern are :
- grouping in one location the elements of the release,
- simplification for the alignment of the code of the different microservices.
For microservices, the central question is to know how to manage dependencies between services or APIs. The concept of git sub-module addresses the question of dependency between git repositories. They allow to create links between repositories and to retrieve within a repository a copy of the state of another repository.
- Pattern #1: Promote a step-by-step migration by using the Strangler application model
- Pattern #2: Testing dependencies
- Pattern #3: Single or multi-repository pattern
- Pattern #4: Data migration
- Pattern #5: Have the changes approved by people close to the problems
More articles on my blog http://www.DevOpsTestLab.com.
My LinkedIn profile: https://fr.linkedin.com/in/brunodelb