gbp-clone(1)
π gbp-clone β the manual, but make it make sense π
okay bestie, pull up a chair, because gbp-clone (from the git-buildpackage suite, the gbp clone command you'll actually type) is about to become your new fave. she clones a Git repo from a remote and sets up all the branch tracking for you. no cap. β¨
πΈ NAME πΈ
gbp-clone β clone a Git repository from a remote and set up the necessary branch tracking π«Ά
π¦ SYNOPSIS π¦
gbp clone [--version] [--help] [--verbose] [--color=[auto|on|off]]
[--color-scheme= COLOR_SCHEME] [--all] [--[no-]pristine-tar]
[--debian-branch= branch_name] [--upstream-branch=
branch_name] [--depth= depth] [--reference= repository]
[--postclone= COMMAND] [--[no-]hooks] [--defuse-gitattributes=
[auto|on|off]] [--repo-user= [GIT|DEBIAN]] [--repo-email=
[GIT|DEBIAN]] [--[no-]aliases] [--[no-]add-upstream-vcs]
repository [directory]
π DESCRIPTION π
so like, a regular git clone is fine and all, but gbp clone is not like other girls. she parses the debian/gbp.conf options and clones the remote repository with the correct branches tracked. it's giving β¨competenceβ¨.
and while we're here β bestie, it is recommended to use gbp pull and gbp push to update the repo later, because that spares you from having to run git pull and git push a million times or with lengthy arguments just to sync each tracked branch. the way that saves us so many keystrokes ππ
β¨ OPTIONS β¨
--versionβ print the version of the program, like the version of the git-buildpackage suite. cute, quick, iconic.-v,--verboseβ verbose execution. she tells you everything π-h,--helpβ print help and exit. your little emergency exit πͺ--color=[auto|on|off]β whether to use colored output. decorate the terminal, girl π--color-scheme=COLOR_SCHEMEβ the colors to use in output (when color is enabled, obvs). the format forCOLOR_SCHEMEis'<debug>:<info>:<warning>:<error>'. Numerical values and color names are accepted, and 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). four little fields, four little moods π--allβ track all branches, not only debian and upstream. collector behavior, honestly.--debian-branch=branch_nameβ the branch in the Git repository the Debian package is being developed on. default ismaster.--upstream-branch=branch_nameβ the branch in the Git repository the upstream sources are put onto. default isupstream.--depth=depthβ Git history depth, for creating shallow git clones. surface level only, and that's valid π«§--reference=repositoryβ local repository to use as alternate instead of re-copying data from the remote repository. recycling! we love her β»οΈ--pristine-tarβ track pristine tar branch. yes ma'am π--[no-]hooksβ enable running hooks.--postclone=COMMANDβ executeCOMMANDafter cloning the source from the remote. the exported environment variables are:GBP_GIT_DIR(the repository the package is being built from).
heads up bestie: if you clone a repository that contains a hook configuration in debian/gbp.conf, this hook will not be run automatically, to prevent execution of untrusted code. safety first, always π
--defuse-gitattributes=[auto|on|off]β disable Git attributes that may interfere with building packages. works by updating.git/info/attributesto override attributes in the upstream sources which may cause files to be transformed on checkout. more specifically, a new macro attribute is defined,[attr]dgit-defuse-attrs, which is then applied to*together withexport-substandexport-ignore. this is done to be compatible withdgitandgit-deborigwhich disable Git attributes this way. if set toauto, first check whether there are any.gitattributesfiles in the upstream source, and act only if there are some. if set toon, unconditionally there are some. if set tooff, does nothing. auto is the vibe-check setting π¦--repo-email=[GIT|DEBIAN]β when set toDEBIAN, use theDEBEMAILenvironment variable to set theuser.emailGit configuration, otherwise use Git's defaults.--repo-user=[GIT|DEBIAN]β when set toDEBIAN, use theDEBFULLNAMEenvironment variable to set theuser.nameGit configuration, otherwise use Git's defaults.--[no-]aliasesβ whether to expand gbp specific aliases for remote repos likesalsa:. shortcuts are so main character π--[no-]add-upstream-vcsβ whether to add the upstream git repository as an additional remote. the repository url is read from the"Repository"field indebian/upstream/metadata. bringing the whole friend group along π«Άrepositoryβ the (possibly remote) repository to clone from. this is usually a Git URL but some shortcuts are supported (see below). iykyk πdirectoryβ the directory to clone to.
π EXAMPLES π
clone the Debian packaging repository and the upstream repository in one go:
gbp clone -add-upstream-vcs vcs-git:entr
the branches, tags and pristine-tar will be automatically setup correctly following the contents of debian/gbp.conf in the package, and there will be an additional git remote with the name upstreamvcs that points to the upstream Entr repository on GitHub. one command, whole ecosystem. periodt. π₯
a parameter on the command line would override anything in the debian/gbp.conf file. for example, clone a repository and setup a tracking branch for pristine-tar as well:
gbp clone --pristine-tar git://honk.sigxcpu.org/git/git-buildpackage.git
clone from the Git-Vcs URL of a package:
gbp clone vcs-git:libvirt
clone a repository from Salsa (Debian's code hosting):
gbp clone salsa:agx/git-buildpackage
clone from a GitHub repository:
gbp clone github:agx/git-buildpackage
π§ CONFIGURATION FILES π§
several gbp.conf files are parsed to set defaults for the above command-line arguments. see the gbp.conf(5) manpage for details. your config file is basically your journal, bestie π
π SEE ALSO π
gbp-buildpackage(1), gbp-pull(1), gbp-setup-gitattributes(1), gbp.conf(5), gitattributes(5)
go read the rest of the friend group, they're all iconic π
π AUTHOR π
Guido GΓΌnther <agx@sigxcpu.org> β the legend herself π«‘
and that's the whole page, bestie!! this was the git-buildpackage Manual version 26 May 2026 of gbp-clone(1). now go clone something slay β¨ππΈπ¦π
π¦ 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