We are using gitflow and currently have an open release branch.
The release at A is currently on the test-system to get tested by key-users. In the meantime we need to release an urgent hotfix. Commonly we pull out a branch of master (so the latest live-system release) and merge it into development and master. If we would do this here, we would not have the hotfix in the currently open release.
So what do I have to do at the point marked as "?" in the illustration? Assume that the hotfix is ready to get merged.
You might merge it to master and develop as you used to do - and cherry-pick the hotfix commit(s) to be merged into your branch release as well. Doing so the hotfix will be available in all of your branches - and you are sure that only the hotfix related changes are merged into your branch release.
If you want to have all changes from branch hotfix within branch release - just do a plain merge.
Your question is rather a general git best-practice question than a Bitbucket related question.
Additional remark: Even if you are using gitflow, you are still free to merge your changes to anywhere you want.
For example: if you don't want to have the hotfix on your develop branch, just merge it manually to your master branch and to your branch release. After this you can delete your branch hotfix. Doing so, you left the straight git-flow path ... but who cares?
If you don't want to merge all changes from your hotfix branch to your relase branch you should do a git cherry-pick, to select the commits you want to be available on your release branch.
In the most cases a prerequisite of cherry-pick are good structured commits, where each commit only contains single, comprehensive changes.
As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs