tags:

views:

30

answers:

1

Hi,

how do I push a commit in two branches?

I can't use "git push", because then it pushes to three branches, and i just want the commit in two of them..

Ive tried a "git merge HEAD --commit id from branch A--" in branch B, but then it takes everything from branch A and merges with branch B. I just want the last commit and not everything else merged with branch B.

Anyone know what to do?

+4  A: 

You can apply already existing commit to another branch using cherry-pick command, and then push both branches using git push origin branchA branchB.

max
Nice, i'll look into it right away..
Madoc
worked like a charm, thanks! :)
Madoc