GIT-DEBCHERRY(1)
π GIT-DEBCHERRY π
okay bestie, so this is a page from the General Commands Manual and it's all about a lil tool called git-debcherry (yes, manual section 1, we're in the big leagues now). Pull up a chair, grab a strawberry π, and let's get into it.
β¨ NAME β¨
git-debcherry β it exports commits that touch upstream source and turns them into patches. that's the whole vibe. π
πΈ SYNOPSIS πΈ
git-debcherry [options] upstream [integration]
π¦ DESCRIPTION π¦
So here's the deal: this program digs through your git history and tries to cook up a set of patches that meet ALL of these conditions, no exceptions, periodt:
- It is guaranteed to apply to upstream β like, that's non-negotiable π₯
- It produces the same work tree as integration, outside
./debian - It does not touch
./debianβ hands off, bestie π - As much as possible, it matches the git history from upstream to integration
it's giving "carefully curated patch energy" and honestly? obsessed. β¨
π BRANCH PARAMETERS π
upstream
This ref should be suitable for export as a .orig.tar.gz. And like, real talk: 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. π
integration
This branch contains all the debian packaging, plus any changes introduced to upstream source by the debian packager. This argument is optional (chill, you don't have to pass it). If integration is not passed, git-debcherry will just use HEAD. π
π OPTIONS π
The following options are available, and yes, we're listing every single one:
-o,--output-directorydirectory β Place output (patches and series file) in directory. If unspecified, output patches (in mbox format) to stdout. classic.-s,--statβ Only output diffstat of patches. just the stats, no full patch drama π-d,--debugβ Output some debugging information. Probably only useful to developers or those reporting bugs. iykyk π
π EXAMPLE π
To export the patches between tag v3.0+dfsg1 and the current branch into ./debian/patches:
$ git-debcherry -o debian/patches v3.0+dfsg1
and boom, you're done. slay. π
π NOTES π
PERFORMANCE
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. π like, go make a snack, it might be a minute.
DELETED FILES
git-debcherry currently follows dpkg-source(1) in ignoring file deletions. The positive side effect? It doesn't bloat the patches. π But if you really need the files deleted for build and/or licensing reasons, you should delete them in upstream. no cap.
fr fr, read that last bit twice β it's a real caveat, not a vibe.
π SEE ALSO π
π AUTHOR π
git-debcherry was written by David Bremner <bremner@debian.org>. iconic behaviour, honestly. π«Ά
and that's a wrap, bestie! π this page is dated April 27, 2014 and it's from the git-debcherry source. go forth and export those patches, you gorgeous genius you. π¦β¨
π¦ where this page comes from
- debian bookworm: gitpkg 0.30
- debian trixie: gitpkg 0.31+nmu1
- ubuntu jammy: gitpkg 0.30
- ubuntu noble: gitpkg 0.31
- ubuntu questing: gitpkg 0.31+nmu1
- ubuntu resolute: gitpkg 0.31+nmu1build1
- ubuntu stonking: gitpkg 0.31+nmu1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms