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

Your Points Tracker
  • 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
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?
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

Gitflow hotfix backmerge into release when release exists.

We where testing the Gitflow feature inside of Sourcetree yesterday and we discovered something strange.

When we finished a hotfix branch while having a release branch active, the back-merge would only merge the hotfix to master and develop.

That seems strange to us. It would make a lot of sense to merge the hotfix to master and the active release branch. The release branch would eventually merge back into the develop.

We would like to know if this is a known issue and if you have a workaround for this?


3 answers

The standard git-flow workflow suggests merging the hotfix into an active release branch:

"As soon as the fix is complete, it should be merged into both master and develop (or the current release branch), and master should be tagged with an updated version number."

The article that spawned git-flow is more explicit:

"The one exception to the rule here is that, when a release branch currently exists, the hotfix changes need to be merged into that release branch, instead of develop. Back-merging the bugfix into the release branch will eventually result in the bugfix being merged into develop too, when the release branch is finished. (If work in develop immediately requires this bugfix and cannot wait for the release branch to be finished, you may safely merge the bugfix into develop now already as well.)

I just made a quick test with git-flow outside of SourceTree and I find the same as Thijs: standard git-flow commands ignore the release branch.

Unless there are ways of telling git-flow about the release branch, I think I would just issue direct git commands to merge the hotfix in this case:

$ git checkout master
$ git merge --no-ff hotfix/1.1.1
$ git tag 1.1.1
$ git checkout release/1.2.0
$ git merge --no-ff hotfix/1.1.1
$ git branch -d hotix/1.1.1

Obviously merge conflicts are possible when merging the hotfix branch into the release branch and would need to be dealt with. As you suggest, the hotfix naturally flows back into develop when the release branch is merged.

EDIT: The standard git-flow doesn't have an option to merge into the release branch so I think the only option is to do it manually (or abandon the release branch, as suggested above).

0 votes
minnsey Atlassian Team Jan 26, 2018


That is actually the standard git-flow workflow, see the section on Hotfix in

Hi Micheal,


It still seems strange to not merge the hotfix intro a release branch.

But what is the best practice in this kind of situation?

minnsey Atlassian Team Feb 12, 2018

I suspect you should cancel the Release branch and start that again.

Like Control Point likes this

edit: already answered above

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,270 views 4 5
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