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?

1 answer

1 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

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

264 views 5 14
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot