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

Maintaining a release branch

Pratishruti_Nayak June 21, 2019

For every new release, we create a new branch from development and do the testing in release branch.

When we create this release branch all the code from development, including the features we don't want to put in production goes into release branch

Is there a way to merge code into prod for the features which we want to take into release instead of the entire code in dev branch

1 answer

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2019

Hi @Pratishruti_Nayak,

No, you cannot pick an choose what should be part of a branch in Git. Branches are just pointers to different commits in the repository, it is not like for example ClearCase where you can select what is part of a branch. I would recommend that you take a look at Gitflow workflow it shows how you can accomplish this. Basically you do not merge a feature into your development until you want to add it to a release. 

You could of course use selective merge between branches, but you make it more complicated since you would have to do this for each file.

Pratishruti_Nayak June 21, 2019

Thank you for your reply.

What if 2 developers are working on the same feature as a result of which they keep merging code from their feature branch to development.

In case , they don't merge their code for sometime there's a code conflict as a result of which they have to re-base the code and re do the changes

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2019

As a best practice you should always make sure that your feature branch is up-to-date with the latest on the development branch before merging back to it. Bitbucket will also not allow you to continue a merge if the pull request has a merge conflict in it.

Pratishruti_Nayak June 21, 2019

Got it.. Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events