[Pkg-samba-maint] Need help in cherrypicking upstream fixes

Julien Cristau jcristau at debian.org
Tue Mar 8 12:21:36 UTC 2011

On Tue, Mar  8, 2011 at 07:05:38 +0100, Christian PERRIER wrote:

> I need some kind of magic git recipe for dummies.
> I would like to cherrypick fixes from upstream's git by browsing the
> commit log in a given branch (probably 3.5) and pick patches for bugs
> I would like to see fixed in squeeze.
> The problem becomes: how should I proceed?
> I have a local clone of upstream's git.
> I guess I should checkout a branch similar to their 3.5 branch. Then I
> should use some magic there to see what history of commits happened
> and spot those I would like to use (crossing fingers about upstream
> commit messages to be clear about what commit fixes what bug)
> What would you guys recommend as "key commands" for this?
I'd suggest something like the following..

To see the branch history:
$ gitk release-3-5-6..release-3-5-8

create a local branch based on 3.5.6:
$ git checkout -b for-squeeze release-3-5-6

then for each commit you see in upstream's 3.5 branch that you want to
$ git cherry-pick -x $commit

and finally if you want to turn that into a patch series for copying
into your debian packaging tree:
$ git format-patch release-3-5-6
gives you a bunch of 00*.patch files.


More information about the Pkg-samba-maint mailing list