gitatlassian-sourcetreegit-flowhotfix

SourceTree: How to create multiple hotfix branches with Git Flow


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?


Solution

  • 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