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?
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
This command will allow it:
git config --global gitflow.multi-hotfix true
If you want to manually edit your git config then it should look like this:
[gitflow]
multi-hotfix = true
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.
© 2022 - 2024 — McMap. All rights reserved.