Subject: Re: Pull from one branch to another?

From: Junio C Hamano <[email-masked]>
Date: Wed, 28 Sep 2005 23:35:33 -0700

Jeff Garzik <[email-masked]> writes:

> My question:  is this the best/right way to pull one branch into 
> another?  It's been working for me, for months, but...

Yes, that is how 'resolve' is designed to work.

You could instead use standard 'git pull' from the local
repository.  Here is what I usually do in git.git repository:

    $ git checkout foo
    $ ... work in foo "topic" branch
    $ git checkout bar
    $ ... work in bar "topic" branch
    $ git checkout pu
    $ git pull . foo bar

End result: foo and bar branches are pulled from the local
repository and merged into pu branch, as an Octopus.

Of course, I could instead:

    $ git checkout pu
    $ git pull . foo
    $ git pull . bar

to pull 'foo' and then 'bar' in sequence, which is easier if
these topic branches touch overlapping area, because Octopus
does not allow manual resolving.  On the other hand if I know
foo and bar are independent work, there is no point recording
the order of merges (merging foo first and then bar does not
have any significance) and I tend to let Octopus to happen.