Skip to content

Reasons to choose single repository structure for version control

Shikher Verma edited this page May 3, 2016 · 2 revisions

One repository per package/stack vs One repository for all of the code

Pros :

  1. beginner friendly New developers won't have to spend more time learning the VC structure before they can start coding. Don't need to learn about git submodules or tags. Fracturing a project repository means they have to pick up the VC structure in addition the code's architecture.
  2. Easier bug discovery single repository makes it easier to check for breaking changes, forced to keep source code consistent. bugs discovered at the time of creation.
  3. Right time individual components are mature enough to merge in a single repo, since they wont be changing as dramatically as they use to.
  4. Easier versioning easier version management. with one repo per package we would be forced to use tags to maintain version of the whole project. But with one central repository we cut down the maintainance over head.

Note for other dev

My opinion is to use one repository per product. If there is some common code on which more than one product depends then move it to a submodule. I don't think moving individual modules of the same product to different repositories is justified when changes in one can break the other.

These two articles really help in highlighting the two opinions :