Subject: Pull from one branch to another?

From: Jeff Garzik <[email-masked]>
Date: Thu, 29 Sep 2005 02:07:57 -0400

I currently use the attached script to merge the contents of one branch 
into another branch, in my kernel trees:

	$ cd /repo/netdev-2.6
	$ git checkout -f sky2
	$ ... merge patches ...
	$ git checkout -f upstream
	$ ... merge more patches ...
	$ git checkout -f ALL
	$ git-pull-branch upstream
	$ git-pull-branch sky2

End result:  'ALL' branch contains everything in 'sky2' and 'upstream' 
branches.  I use the above for creating an all-inclusive branch that 
users can test, and that Andrew Morton can pull into his -mm kernel tree.

Right now, my git-pull-branch script (attached) simply calls 
git-resolve-script, which nicely skips the fetch step and any 
complications related to that.

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

	Jeff

#!/bin/sh

git-resolve-script HEAD $1 "`pwd` branch '$1'"