Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Maintaining multiple minor versions in one repository

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

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
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

505 views 6 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you