I'm using git and I have a repo with a bunch of branches.
If I do a hotfix on branch master (or another branch), how can I easily merge this fix into all those branches. Do I have to merge each branch one by one (like so: Merging one change to multiple branches in Git) or is there an easier way?
I'd recommend you have a look at git flow and it's tool support.
The hotfix support of git flow is creating a bugfix branch which can be merged into your production branch (probably master
) and your development branch (in git flow develop
). The hotfix branch starts from master
. Since all changes of master are merged into develop
after each release you can merge the hotfix branch into develop
as well without having to merge commits you didn't intend to be merged.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With