github merge 2 branches to a third branch code example
Example 1: how to switch branches in git
git checkout [branch name]
Example 2: how to create a patch file between 2 branches git
git diff master Branch1 > ../patchfile
git checkout Branch2
git apply ../patchfile