DOKK / manpages / debian 10 / gitpkg / git-debcherry.1.en
GIT-DEBCHERRY(1) General Commands Manual GIT-DEBCHERRY(1)

git-debcherry - export commits touching upstream source as patches

git-debcherry [options] upstream [integration]

This program will analyze git history and try to create a set of patches meeting the following conditions:

1. Is guaranteed to apply to upstream

2. Produces the same work tree as integration, outside ./debian

3. Does not touch ./debian

4. As much as possible, matches the git history from upstream to integration

This ref should be suitable for export as a .orig.tar.gz. In particular note that quilt has no way of deleting files that does not include the material to be deleted in the patch, so your upstream branch should include any necessary file deletions.

This branch contains all debian packaging, plus any changes introduced to upstream source by the debian packager. This argument is optional. If integration is not passed git-debcherry will use HEAD.

The following options are available:

Place output (patches and series file) in directory. If unspecified, output patches (in mbox format) to stdout.

Only output diffstat of patches

Output some debugging information. Probably only useful to developers or those reporting bugs.

To export the patches between tag v3.0+dfsg1 and the current branch into ./debian/patches:


$ git-debcherry -o debian/patches v3.0+dfsg1

git-debcherry currently uses git-filter-branch(1) to rewrite all commits on the integration branch not present upstream. Depending on the number of such commits, this can be noticeably slow.

git-debcherry currently follows dpkg-source(1) in ignoring file deletions. This has the positive side effect of not bloating the patches, but if you really need the files deleted for the build and/or licensing reasons, you should delete them in upstream.

gitpkg(1)

git-debcherry was written by David Bremner <bremner@debian.org>.

April 27, 2014