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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.