SourceTree: How to create multiple hotfix branches with Git Flow
Asked Answered
A

4

18

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?

Alduino answered 26/9, 2017 at 19:40 Comment(0)
A
37

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

  1. in Sourcetree click Terminal
  2. 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)

  1. in Sourcetree click Terminal
  2. git checkout -b hotfix/my_new_hotfix master

Now you have a new hotfix named my_new_hotfix

Alduino answered 26/9, 2017 at 19:40 Comment(0)
A
6

This command will allow it:

git config --global gitflow.multi-hotfix true

Anagram answered 6/3, 2018 at 23:20 Comment(1)
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.Anagram
B
0

If you want to manually edit your git config then it should look like this:

[gitflow]
    multi-hotfix = true
Bridgeboard answered 10/3, 2021 at 8:2 Comment(0)
C
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.

Colure answered 18/3, 2022 at 13:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.