git-debpush(1)
π NAME π
git-debpush β bestie, this is the one that makes a git tag with metadata for an ftp-master upload π
(also: the manual is literally called git-debpush, we been knew π)
β¨ SYNOPSIS β¨
git debpush [option...]
π¦ DESCRIPTION π¦
okay so. git-debpush is a lil wrapper around git-tag(1) and git-push(1). That's it, that's the vibe. It helps you create and push a very specially formatted, signed tag β and that tag is basically screaming "hey, this commit right here should get pushed (or, like, uploaded) to a Debian-style archive" π
Typically, your git server is set up to ping some intermediary service the second you push that new tag. Then that service goes and fetches your tag, checks your PGP signature, does whatever conversion is needed (think: producing and signing a .dsc and .changes), and uploads the result to the Debian-style archive. Iconic behaviour, no notes β¨
β οΈ git-debpush is only for source-only uploads. That's the whole lane, babe.
πΈ TYPICAL USAGE πΈ
Here's the tea π: git-debpush was designed so that for your regular, everyday uploads of a package, you literally just run it with no command line arguments at all. Obsessed with the lack of effort tbh.
So the flow is: you build and test some .debs, you run dch(1) to finalise your changelog, you commit that result, and then you just type git debpush β and the intermediary service plus your distribution's autobuilder network handle every single thing after that. Main character delegation energy π
% git debpush
Now. The most common exception to this whole "no args needed" fantasy is the first time you use git-debpush for a non-native package. For that one you will need to pass a quilt mode option, so the intermediary service knows which git branch format you're working with. Like, for example:
% git debpush --gbp
if you're using the git branch format that's typically used with gbp(1). The available quilt mode options live down in "QUILT MODE OPTIONS" below, go peek π
Aside from a few sanity checks to help you avoid broken uploads, git-debpush does not do anything with the information the quilt mode option gives it. It just embeds the corresponding quilt mode in the tag it generates, for the intermediary service to read. That's it. Lowkey a delivery service π¦
Future invocations of git-debpush will try to read the quilt mode out of the tag that git-debpush generated for your previous upload. Cute. But you can always override that on the command line by passing a quilt mode option β and the command line always takes precedence. Periodt.
π Mistakes π
If you used git-debpush to make a tag but you haven't pushed it yet β either because you passed --tag-only/-t, or because the push straight-up failed β then it's totally fine, you can delete it and make another one, no stress π«Ά (and if the push is what failed, you can literally just run git-debpush again without deleting the tag, and it'll retry just the push. Slay.)
BUT. π¨ If a tag made by this script has been pushed, then do not:
- delete the tag, locally or remotely;
- rewind (force push) the branch the tag is on; or
- remove any entries from
debian/changelog.
The intermediary service won't let you reuse the version number anyway, so it's not even giving you anything, and taking any of these actions may make it unnecessarily difficult to try another upload. Not the vibe. Instead: add a new changelog stanza and run git-debpush again. That's the move π
π BEHAVIOUR π
Short version, iykyk: git-debpush just makes a git tag, and pushes. Then the tag2upload service makes and uploads a source package. Done and dusted β¨
Long version, because you deserve the full lore: after reading command line options and configuration, git-debpush:
- Checks that your remote is accessible by unauthenticated https. (Private repos don't work, because the tag2upload service can't fetch your intended upload. Sorry bb π)
- Fetches, from your remote, the remote branch corresponding to
HEAD, anypristine-tarbranch, and any missingdebian/tags. - Determines the quilt mode, based on the previous upload tags and command line options.
- Determines the
upstreamtag (using the same approach asgit-deborig), and determines whether the localpristine-tarbranch has data for this upload. - Prepares and signs a git tag containing the upload instructions.
- Pushes the git tag, and any updates to the current branch. Also pushes the upstream tag, the
upstreambranch (if the upstream tag isupstream/), and thepristine-tarbranch, as applicable.
git-debpush makes many other (local) checks for anomalies; these can generally be overridden (interactively, or with --force). And the tag2upload service does even more thorough checks: for example, that an NMU is not being accidentally overwritten, and that the source package corresponds precisely to your tagged commit. She's thorough, she's meticulous, she's that girl π
π SETUP FOR SOURCE FORMAT 1.0 π
okay so git-debpush needs to tell the intermediary git service whether this is a native or non-native package. And because of historical Debian practices (the lore is long, don't ask), it is not sufficient for either git-debpush or the intermediary service to just rely on the version number in debian/changelog. Nope. Not today π
If you're using one of the 3.0 source package formats, then git-debpush will just look in debian/source/format to figure out whether the package is native or non-native β and you can ignore this entire section of the manpage, bestie. Go live your life π¦
If you're using the 1.0 source package format β meaning either debian/source/format does not exist, or it contains the string "1.0" β then git-debpush must be told whether the package is native or non-native. We do that using debian/source/options π
If your package is non-native, run:
% echo "-sk" >>debian/source/options
If your package is native, run:
% echo "-sn" >>debian/source/options
(And just so you know: with source format 1.0, dpkg-source(1) decides whether the package is native or non-native based on the presence or absence of an orig.tar in .. β but git-debpush is a pure git tool that never looks at tarballs. She doesn't do tarballs, she does tags π
)
π QUILT MODE OPTIONS π
--quilt=gbp/--gbpβ You're using the patches-unapplied branch format, as typically used with gbp(1) or quilt(1).--quilt=dpm/--dpmβ You're using git-dpm(1)'s branch format.--quilt=baredebian[+git]/--baredebian[+git]β You're using the 'bare debian' branch format, with the upstream source in the form of an upstream tag.--quilt=baredebian+gitis an alias for--quilt=baredebian. Same thing, different outfit β¨
--quilt=linearβ You're usinggit-debrebase, or semi-manually maintaining a patches-applied branch.- The intermediary service will add a new patch for each commit touching the upstream source that isn't already represented in
debian/patches.
- The intermediary service will add a new patch for each commit touching the upstream source that isn't already represented in
--quilt=singleβ You're editing the upstream source code directly and you do not care about maintaining a broken-down series of patches. Valid.- All changes to the upstream source will be squashed into a single patch in
debian/patches, replacing any existing patches. - Prefer this to the
single-debian-patchdpkg-source option. (See--quilt=singlein dgit(1) for the explanation π)
- All changes to the upstream source will be squashed into a single patch in
--quilt=smash/--quilt=try-linear/--quilt=unapplied/--quilt=nofixβ Identical to the corresponding dgit options. Please refer to dgit(1). Mostgit-debpushusers won't want these modes, ngl.
π OTHER OPTIONS π
okay bestie welcome back, we're still in the options section, and these are the rest of the knobs you can turn. strap in, there's a LOT.
--dry-run|-nβ runs all the checks and generates the tag text, but it does not sign or create the tag, and it does not push. literally just a lil dress rehearsal π--tag-only|-tβ just make the tag, don't push it. if you also pass--dry-run|-nthis is a noop, like it does nothing, they cancel each other out π«--print-tag-textβ also prints the (unsigned) tag text to standard output. super useful together with--dry-run|-nif you're doing scripting, iykyk π¨οΈ--help|-hβ prints a brief usage summary and dips out. classic.-u keyidβ this gets passed straight on togit-tag(1). not our business, we just hand it over π--branch=BRANCHβ this is where the tag goes, i.e. what you actually want to release. if you don't specify it, the tag lands on whateverHEADpoints to.
lowkey important: this doesn't have to be a real branch! it can be any committish (peepgitglossary(7)). the option is just namedbranchbecause that's the 99% case fr fr.
--upstream=TAGβ when you're pushing a non-native package,git-debpushneeds a tag for the upstream part of your package. by default it asksgit-deborig(1), which goes hunting for a suitable tag based on the upstream version indebian/changelog. so cozy π§--remote=REMOTEβ where do we push tags and branches to? if you don't say, we use whatever remote git would use if you typedgit push BRANCH.--distro=DISTROβ what distribution name gets embedded in the signed tag. defaults to"debian". simple as that β¨--untaint-historyβ a convenience alias for--deliberately-include-questionable-history. see below, and go read TAINTED HISTORY indgit(7). it's giving lore.--deliberately-DELIBβ requests certain overrides of checks that are implemented in the server-side processing. fromgit-debpush(1)'s point of view, this is pure metadata, embedded directly in the tag. but when the server finds them in there, it may change aspects of its behaviour π. the following overrides are currently meaningful in Debian:--deliberately-include-questionable-history--deliberately-not-fast-forward
check TAINTED HISTORY in dgit(7) for the details of when to use those. for other upload targets, dgit(1) has details of all known deliberatelies β but heads up, an upload server might define its own. π€·ββοΈ
no cap: unlike --force, your use of one of these options is permanently recorded in the signed tag. it lives there forever, bestie. choose wisely π
--force|-fβ ignore the results of all checks designed to prevent broken uploads. yes, all of them. yolo mode.
note that this does not imply doing a git force push.git-debpushnever passes-fthrough togit push. if you need that, usegit debpush -tand then do your own git force push. one thing at a time π«Ά
--force=check[,check] ...β override individual checks designed to prevent broken uploads. can be specified more than once.
using--forceor--force=checkmight cause the upload to fail at some later point in the process. foreshadowing π
the valid values for check are described next. the checks come in two groups: ones where git-debpush in interactive use will offer to ignore the failure (with a y/n prompt), and ones whose failure always makes git-debpush exit, unless forced.
failures of these checks can be ignored during interactive use:
uncommittedβ ignore that there are uncommitted changes to tracked files.untrackedβ ignore that there are untracked files. (for the bare debian branch format, untracked files outside ofdebian/are always ignored.)changed-quilt-modeβ ignore the fact that the quilt mode option supplied on the command line is different to the one we would have autodetected. overriding this is appropriate if the package's git workflow practices have changed since the last upload.upstream-nonancestorβ ignore the fact that the upstream tag is not an ancestor of the branch to be tagged (skipping this check is implied by--quilt=baredebian).unreleasedβ permit upload to a suite calledUNRELEASED.dgit-viewβ ignore apparently pushing the dgit view of a package (as produced bydgit clone) to the maintainer branch, where the dgit view and the maintainer view of the package are not identical.unstitchedβ ignore the fact that the branch to be pushed seems to be agit-debrebase(1)branch in an unstitched state (seegit-debrebase(5)).detachedβ ignore the fact thatHEADis to be tagged, butHEADis detached (this check is only run when--branch=HEADor no--branchoption is specified).branch-behindβ ignore that the local branch is behind its upstream, risking uploading out-of-date source code. if you override this then only the tag, and not the commit to which it points, can be pushed.branch-divergedβ ignore that the local branch and its upstream have diverged, such that only the tag, and not the commit to which it points, can be pushed. this risks uploading out-of-date source code, now or in the future.debian-upstream-divergedβ ignore that the local Debian upstream tracking/import branch"upstream"has diverged from the"upstream"branch on the remote. this prevents us pushing the"upstream"branch, but we'll still push the upstream tag. proceeding risks uploading work based on out-of-date upstream source code, now or in the future.pristine-tar-behindβ ignore that the local pristine-tar branch is behind upstream (or absent). this risks the use of stale pristine-tar data and therefore possible generation of unintended orig tarballs.pristine-tar-divergedβ ignore that the local pristine-tar branch and its upstream have diverged. this prevents us pushing the pristine-tar branch, and risks unexpected orig tarballs being generated now, or in the future.repo-inaccessibleβ ignore that the repository to which the tag will be pushed does not seem to be publically accessible.remake-tagβ ignore that a tag of the same name thatgit-debpushproposes to make already exists, with different content. overriding this check implies passing-ftogit-tag(1).unknown-delibratelyβ ignore that a--deliberately-*option was supplied that this version ofgit-debpushdoesn't know about. this might be correct, for example if you're running an old version ofgit-debpush, or uploading elsewhere than to Debian. but otherwise it's likely to be a typo. note that unknown (or inapplicable)--deliberately-*options will be silently ignored by the server.
failures of these checks are always fatal, unless forced:
upstream-nonidenticalβ ignore any differences between the upstream source in the upstream tag and the upstream source in the branch to be tagged (this check is only run when using--quilt=gbpor--quilt=unapplied).patches-nonapplicableβ ignore any failures of the following two checks:- with
--quilt=gbp,--quilt=unapplied,--quilt=baredebian,--quilt=dpm, and--quilt=nofix, the quilt patches should apply cleanly to the upstream source withgit-apply(1). - with
--quilt=dpmand--quilt=nofix, applying the quilt patches to the upstream source should produce exactly the source tree to be tagged.
- with
submoduleβ ignore that there are git submodule(s). submodules are not supported.local-optionsβ ignore that the filedebian/source/local-optionsexists. this file is not supported (but note you can usedebian/source/options). π‘
--batchβ when used interactively, and a test fails,git-debpushwill sometimes offer to ignore the failure, depending on the likelihood that ignoring the failure will result in a broken upload. passing this option disables that interactive prompting. so no more y/n pop-ups, it just decides for you π--extra-metadata=<KEY[=VALUE]>β adds an extra metadata item to the tag.KEY[=VALUE]gets inserted in one of the output[dgit ...]lines. this option can be repeated as needed.
you have full manual control. syntax and semantics are completely unchecked. this might be useful, for example, if you're running an old version of git-debpush, or uploading elsewhere than to Debian. free rein, bestie π¦
--no-pristine-tarβ prevent detection and use of pristine-tar data. if new origs need to be generated, they'll be made with"git-deborig". π
π FILES π
- git configuration β
git-debpushis influenced by git configuration options, notably"remote.pushDefault","branch.BRANCH.pushDefault","branch.BRANCH.pushRemote", and"remote.REMOTE.url". ".git/git-debpush"β used for temporary working areas. will normally be cleaned up after a successful run, so tidy β¨
π SEE ALSO π
- <https://wiki.debian.org/tag2upload>,
tag2upload(5) - Git branch formats in use by Debian maintainers: <https://wiki.debian.org/GitPackagingSurvey>
π AUTHOR π
the original author of git-debpush and this manpage is Sean Whitton <spwhitton@spwhitton.name>, with much input from Ian Jackson <ijackson@chiark.greenend.org.uk>. absolute icons, we stan π
okay so that's the whole page, bestie!! this one comes to you from the Debian Project β the dgit+tag2upload team to be specific β and yeah it's git-debpush(1). go tag something, you've got this πβ¨π
π¦ where this page comes from
- ubuntu stonking: git-debpush 17.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms