1

We are using the concept of feature/bugfix, develop and release branches in Git and we do not maintain a master branch.

Builds for QA and the final build for production release are taken from a release branch while snapshots are taken from develop branch.

Say we have 2 releases currently in development:

Release 1
Release 2

Main problem: Merging the changes from Release 1 to Release 2. We usually do a big merging after Release 1 is deployed in production. This results to several merge conflicts.

What is the best workflow to prevent this?

One idea we have is to merge the feature/bugfix branches of Release 1 to the develop branches of Release 1 and Release 2. Though this will mean additional work for the developers.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

Merging (git merge) from release branch is generally not the best practice: some commits are done only for one release and would not apply to another.

Cherry-picking is generally done between two branches which have no intent to be merged (each release branch has its own independent history).
There will still be conflicts, but at least their origin is easier to spot (it comes the the specific commit being cherry-picked).
The same idea apply for the bug-fix branch (not all fixes apply to the next release branch, hence cherry-picking).
A feature branch though could be merged.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250