How can I create a second hotfix branch in Sourcetree when one already exists? Whenever I try to it tells me to finish my current hotfix first. Any way to have multiple hotfix branches?
Asked
Active
Viewed 1.4k times
4 Answers
32
Ok figured it out. Sourcetree by default doesn't allow you to create more than one hotfix branch at a time using their UI/Git Flow. It wants you to "Git Flow > Finish" the first one before making a new one.
But you can create a second hotfix anyways...
Permanent solution for this repository
- in Sourcetree click Terminal
git config --add gitflow.multi-hotfix true
Now you can as per usual: Git Flow > Start New Hotfix
Temporary solution (allow it just this one time)
- in Sourcetree click Terminal
git checkout -b hotfix/my_new_hotfix master
Now you have a new hotfix named my_new_hotfix

Andrew
- 18,680
- 13
- 103
- 118
4
This command will allow it:
git config --global gitflow.multi-hotfix true
-
Sorry it should have been git config --global gitflow.multi-hotfix true There should not have been a word "set". Also, note that if you want for all your configs you use --global. Otherwise it will apply only to the current repo. – jvoigt Aug 14 '18 at 18:08
0
If you want to manually edit your git config then it should look like this:
[gitflow]
multi-hotfix = true

Naxos84
- 1,890
- 1
- 22
- 34
0
You can have multiple hotfixes if you push your first one and delete it locally. You can then pull it back down again after creating the new one.

John Lord
- 1,941
- 12
- 27