gbp-pq(1)
π
gbp-pq β the gbp-pq(1) girlie's guide β¨
okay SO. we're in the git-buildpackage Manual bestie, and this page is all about gbp pq. buckle up π
πΈ NAME πΈ
gbp-pq β manage debian/patches in Git without any need for GNU Quilt π¦
β¨ SYNOPSIS β¨
gbp pq [--version] [--help] [--verbose] [--color=[auto|on|off]]
[--color-scheme= COLOR_SCHEME] [--[no-]patch-numbers]
[--patch-num-format= format] [--[no-]renumber]
[--[no-]find-copies] [--topic= topic] [--time-machine= num]
[--[no-]drop] [--abbrev= num] [--force] [--commit]
[--meta-closes=bug-close-tags]
[--meta-closes-bugnum=bug-number-format] [--pq-from=
[DEBIAN|TAG]] [--upstream-tag= tag-format] [--[no-]ignore-new]
drop | export | import | rebase | switch
π«Ά DESCRIPTION π«Ά
so gbp pq helps u manage quilt patches in Debian packages that are maintained with gbp. it's especially useful with packages using the 3.0 (quilt) source format. the way that this works is: with gbp pq, you can maintain the quilt patches that should be applied to a package on a separate branch called a patch-queue branch. so if your Debian package lives on master, the associated patch-queue branch will be called patch-queue/master. bestie that's literally so clean π
see β¨https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.patches.htmlβ© for example workflows π
π ACTIONS π
importβ create a patch queue branch from quilt patches indebian/patches/that are listed indebian/patches/series. the patches must apply without fuzz, no cap. fr fr.exportβ export the patches on the patch-queue branch associated to the current branch into a quilt patch series indebian/patches/and update theseriesfile. slay.rebaseβ switch to the patch-queue branch associated to the current branch and rebase it against the current branch.dropβ drop (delete) the patch queue associated to the current branch. so if you're on branchfoo, this would drop branchpatch-queue/foo. πapplyβ add a single patch to the patch-queue similar to usinggit-am. use--topicif you want the patch to appear in a separate subdir when exporting the patch queue usingexport. this can be used to separate upstream patches from Debian specific patches π§switchβ switch to the patch-queue branch if on the base branch, and switch to base branch if on patch-queue branch. it's giving teleport β¨
π OPTIONS π
--versionβ print version of the program, i.e. version of the git-buildpackage suite.-v,--verboseβ verbose execution π£οΈ-h,--helpβ print help and exit.--color=[auto|on|off]β whether to use colored output. (as u should tbh π)--color-scheme=COLOR_SCHEMEβ colors to use in output (when color is enabled). the format forCOLOR_SCHEMEis'<debug>:<info>:<warning>:<error>'. numerical values and color names are accepted, empty fields imply the default color. for example,--git-color-scheme='cyan:34::'would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red).--[no-]patch-numbersβ whether or not the patch files should be prefixed with a number. the default is to export patches with patch numbers. note, however, that this normally affects patches whose names are automatically generated, and has no effect on exporting patches which have aGbp-Pq: Nametag, since the name specified is preserved unless the--renumberoption is used. iykyk π₯--patch-num-format=formatβ the format specifier for patch number prefixes. the default format is'%04d-'.--[no-]renumberβ whether or not to renumber patches exported from the patch queue, instead of preserving numbers specified inGbp-Pq: Nametags. the default is not to renumber patches. useful when patches need to be renamed for the sake of uniformity. for example, using--renumberwith--no-patch-numwill strip all numeric prefixes from exported patches. obsessed π--[no-]find-copiesβ whether to use copy detection when generating patches.--topic=topicβ topic to use when importing a single patch.--time-machine=NUMβ when importing a patch queue fails, go back commit-by-commit on the current branch to check if the patch-queue applies there. do this at mostNUMtimes. this can be useful if the patch-queue doesn't apply to the current branchHEADanymore, e.g. after importing a new upstream version. β³ (yes bestie, actual time machine energy)--[no-]dropβ whether to automatically drop (delete) the patch queue branch after a successful export.--abbrev=NUMβ when exporting a patch queue, abbreviate commit, instead of showing the full 40-byte hexadecimal object name in header lines, show only a partial prefix of lengthNUM. this is useful when existing patches were not generated bygbp pq.--forceβ in case ofimport, import even if the patch-queue branch already exists and overwrite its content withdebian/patches. π«£--commitβ in case ofexport, commitdebian/patchesthe changes to Git after exporting the patches.--meta-closes=bug-close-tagsβ what meta tags to look for to generate a commit message when usingexport --commit. the default is'Closes|LP'to support Debian and Launchpad.--meta-closes-bugnum=bug-number-formatβ what regular expression should be used to parse out the bug number when usingexport --commit. the default is'(?:bug|issue)?\#?\s?\d+'. seegbp-dch(1)for details.--pq-from=[DEBIAN|TAG]β how to find the starting point for the patch queue base. the options areDEBIAN, that will use the Debian branch as the base for the patch queue branch, andTAG, that will use the corresponding upstream tag as a base for the patch queue branch.
this is only needed if your upstream branch is not merged in the Debian branch. the default is DEBIAN.
--upstream-tag=TAG-FORMATβ use this tag format when looking for tags of upstream versions, default isupstream/%(version)s.--[no-]ignore-newβ don't abort if there are uncommitted changes in the source tree or the current branch doesn't match theDEBIAN-BRANCH.
π TAGS π
when exporting patches from a patch-queue branch, gbp pq will look at the patch header for special tags it recognizes. all tags need to start at the first column and require at least one whitespace after the colon β no sneaky indented tags, bestie, it will not see them π
Gbp-Pq: Ignoreβ ignores the commit, no patch is generated out of it.Gbp-Pq: Name nameβ the name to use for the patch when running
gbp pq export
if unset, it will be formatted like git am would format it.
Gbp-Pq: Topic topicβ moves the patch into a subdir calledtopicwhen running
gbp pq export
this allows for some structure below debian/patches. cute AND organized π
β EXAMPLES β
create a temporary branches-applied branch from files currently in debian/patches/*, and switch to it so that one can easily modify the files directly and manage the metadata as git commits, modify the files with git commands (thus avoiding quilt) and manage the metadata as git commits:
gbp pq switch --force
re-create the contents of debian/patches/* using the commits on the patches-applied branch, commit it on the actual Debian packaging branch, and delete the temporary patches-applied branch::
gbp pq export --drop --commit
π SEE ALSO π
gbp-buildpackage(1), dpkg-source(1), quilt(1), gbp.conf(5)
π AUTHOR π
Guido GΓΌnther <agx@sigxcpu.org>
and that's the whole page bestie, no notes π
this was gbp-pq(1) from the git-buildpackage Manual, dated 26 May 2026 β periodt β¨ go forth and manage ur patch queue, main character π¦
π¦ where this page comes from
- ubuntu stonking: git-buildpackage 0.9.43 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms