We are doing development for automation code.
Our code automates the company's products and is synced to a particular product version.
Currently, we have 1 big Git repository with multiple branches in it - v1.0, v1.1, v2.0 (automation for version 1.0 goes in v1.0 branch, and so on).
What are the advantages and disadvantages of having these in a single repository with branches vs. keeping each version code in a separate repository ?
Both solutions can work, the answer i'm looking for is a list of pros/cons for either approach.
I know that many teams are using branches to isolate temporary stages in development, such as doing a bug fixes or a new feature, merging back the work into the main development branch in the end.
Other modes of work i know are having different branches for development, release, etc, to separate "cleaner" revisions of the code from dirty ones that are constantly being worked on.
None of these sound similar to what we are currently doing though.
*Note that some modifications in a particular version we make are relevant for all product versions, while some are not.
I would argue the single repo approach is a simpler and more classic approach.
That said, if you have many versions (which need to be cleaned up regularly), isolating those transient versions in their own repo can work too.
Here's an interesting answer using Git tags and branches from this Stack overflow question: https://stackoverflow.com/a/2714318/1552414 (answer by None-da)
Create a branch of it when you need to modify it for the first time
git checkout -b v3.0.0_branch v3.0.0
Commit to the branch and create new tags when you reach v3.0.1, v3.0.2, v3.1.0
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