Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How can i work on more than one hotfix at a time in sourcetree?

I have a few bugs that i need to fix. Some of them involve some team collaboration so the hotfix branches will be pushed to remote. However, if i attempt to start more than one hotfix sourcetree gives me the following message:

git hotfix start fix-a-bug-2
There is an existing hotfix branch (fix-a-bug-1). Finish that one first.
Completed with errors, see above

How can i create multiple hotfixes? Or if this is not allowed, what is a good work flow to deal with such situations?

2 answers

1 accepted

0 votes
Answer accepted

This is unfortunately how git-flow works (that message is from git-flow itself). Why do you need more than one hotfix branch? The assumption is that if you're doing hotfixes, then there's just one release which you'll be patching, and you'll do it asap so there's not need to split them into multiple branches. If you're collaborating, you can just collaborate on that one hotfix branch. the assumption being that all the fixes here will be much smaller than the new features going back into develop, and therefore they don't really justify their own branches for each fix.

I guess if you really needed to, you could manually create additional fix branches off the hotfix branch (without using the hotfix prefix to avoid confusing git-flow), and merge those back into the hotfix branch before closing it. git-flow doesn't have a workflow for that though, so you'd have to organise that manually before using git-flow to close off the hotfix branch itself. This feels overkill to me but it's probably doable.

I guess it just feels nicer to have a different hotfix branch for each bug that needs to be fixed. Also, if there can only be one hotfix, why does source tree offer a drop down selection for "Hotfix Version" when i want to finish the hotfix?

i'll cross my fingers. thanks for the info!

Because I based the dialogs on the feature workflow originally and didn't realise until later that git-flow didn't allow more than one active hotfix/release - I now call it 'room for future expansion' in case they start allowing it later ;)

But there are some cases when hotfix still in review and you need to start another one

thin you finish one by one and merge master into the one you are about to finish to be up to date with the latest change for the other hotfixes

I really don't like this behavior with Sourcetree. I was looking a new alternative (I'm currently using Smartgit) but this totally stop me from using Sourcetree.


  1. You can be working in one hotfix and while someone review your code you need to start a new hotfix
  2. You can be working in one hotfix and suddenly a more important bug arrived, so you have to create a new hotfix
  3. You can be working in one hotfix, but someone else will continue the work (so you need to push your changes) and you will work in a new hotfix
  1. From master, create a new branch , manually, named hotfix/<your_name>
  2. Now, you have another hotfix branch
  3. Close them , normally by git flow, the new code will be merged to master and develop.

That´s the way I do for years... and works for me.



Like # people like this

I solved my problem with this configuration:

git config --add gitflow.multi-hotfix true 

This should be the top voted answer! Thank you!

It works. Thanks!

Superb, hoping to use this soon!

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...

7,281 views 5 14
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