Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merging one change into multiple branches

Tags:

git

merge

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?

like image 528
Jayne Mast Avatar asked Aug 21 '12 12:08

Jayne Mast


1 Answers

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.

like image 175
stigi Avatar answered Oct 20 '22 19:10

stigi