Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Maintaining multiple minor versions in one repository

Erik_Maessen April 16, 2020

Hi,

We are slowly migrating our SVN repositories to Bitbucket (GIT) and we are running into some issues.

Our core software runs at many different customers and some customers use older versions of our core software, and we cannot simply upgrade the software at those customers. This means that we have multiple (minor) versions of our software that we have to maintain (add new features or do bug fixes).

For example, we have following versions:

  • v4.0
  • v4.1
  • v4.2

These versions are highly dependable, so if we fix a bug in 4.0, there is a big chance we have to merge this fix to 4.1 and 4.2 as well. Same goes for the other way (from 4.2 downwards).

What is in your opinion the best way to set up this repository in git/bitbucket?

  1. Do we create 1 repository and add release branches to it for each minor version? 
    • If we create a bugfix branch for 4.2, is there a way of seeing that its base branch is 4.2? As far as I know, all bugfixes are put together inside the bugfix/ tag. (same for features)
    • I see branches as a temporary thing, but these minor versions will live very long.
  2. Or use separate repositories for each minor version?
    • How to deal with merging between these repositories?
  3. Something else?

We are still quite new at git, and are still quite used to SVN, so we don't know the best practices yet. 

1 answer

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2020

Creating one repository and using branches on demand is the way to go.

Branches should be seen of dual use - they may be temporary as well as long-lasting depending of the purpose of the branch.

Your version branches are definetly long-living branches.

Starting your development you do not need any branches at all - beside of the master branch (this one you need for sure). Just follow your linear development:

4.0.0-->4.0.1-->4.0.2-->4.1.0-->4.1.1-->4.2.0

All those Versions do have git tags, describing the version.

Now you have to deliver a fix for v4.0 - thats the time of point to create a branch (branch on demand) on the latest v4.0 version on master branch

4.0.0-->4.0.1-->4.0.2-->4.1.0-->4.1.1-->4.2.0
                  \
\-------------------------->4.0.3(--->4.0.4 .... )

This new branch holds the v4.0 development line.  On this brach you create subsequent v4.0 versions (4.0.4 ....). A suggested branch name would be "v4.0" (sic!)

To have the 4.0.3 fix available in v4.1development line, create a branch on the latest v4.1 version and merge the changes from v4.0-branch to this new branch ... creating version 4.1.2

                                    /--------------------->4.1.2
                             /           /                4.0.0-->4.0.1-->4.0.2-->4.1.0-->4.1.1-->4.2.0 /MERGE
                   \ /
\-------------------------->4.0.3

And having the 4.0.3 fix available in v4.2 just merge into master ... creating version 4.2.1

                                    /-------------------->4.1.2
                                   /                          4.0.0-->4.0.1-->4.0.2-->4.1.0-->4.1.1-->4.2.0--------------------->4.2.1
                   \ /MERGE
\--------------------------->4.0.3

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events