'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH gbp-clone 1 "15 December 2023" "" "git-buildpackage Manual" .SH NAME gbp-clone \- Clone a repository from remote .SH SYNOPSIS 'nh .fi .ad l \*(T<\fBgbp\ clone\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\*(T<\fB\-\-version\fR\*(T>] [\*(T<\fB\-\-help\fR\*(T>] [\*(T<\fB\-\-verbose\fR\*(T>] [\*(T<\fB\-\-color=\fR\*(T>[auto|on|off]] [\*(T<\fB\-\-color\-scheme=\fR\*(T> \fICOLOR_SCHEME\fR] [\*(T<\fB\-\-all\fR\*(T>] [\*(T<\fB\-\-[no\-]pristine\-tar\fR\*(T>] [\*(T<\fB\-\-debian\-branch=\fR\*(T> \fIbranch_name\fR] [\*(T<\fB\-\-upstream\-branch=\fR\*(T> \fIbranch_name\fR] [\*(T<\fB\-\-depth=\fR\*(T> \fIdepth\fR] [\*(T<\fB\-\-reference=\fR\*(T> \fIrepository\fR] [\*(T<\fB\-\-postclone=\fR\*(T> \fICOMMAND\fR] [\*(T<\fB\-\-[no\-]hooks\fR\*(T>] [\*(T<\fB\-\-defuse\-gitattributes=\fR\*(T> \fI[auto|on|off]\fR] [\*(T<\fB\-\-repo\-user=\fR\*(T> \*(T<\fB[GIT|DEBIAN]\fR\*(T>] [\*(T<\fB\-\-repo\-email=\fR\*(T> \*(T<\fB[GIT|DEBIAN]\fR\*(T>] [\*(T<\fB\-\-[no\-]aliases\fR\*(T>] [\*(T<\fB\-\-[no\-]add\-upstream\-vcs\fR\*(T>] \fIrepository\fR [\fIdirectory\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBgbp\ clone\fR clones a remote repository and sets up tracking branches for the \fIdebian\fR, \fIupstream\fR and \fIpristine-tar\fR branches. This way you can easily update later using \fBgbp\ pull\fR. .SH OPTIONS .TP \*(T<\fB\-\-version\fR\*(T> Print version of the program, i.e. version of the git-buildpackage suite .TP \*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-verbose\fR\*(T> Verbose execution .TP \*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> Print help and exit .TP \*(T<\fB\-\-color=\fR\*(T>[auto|on|off] Whether to use colored output. .TP \*(T<\fB\-\-color\-scheme=\fR\*(T>\fICOLOR_SCHEME\fR Colors to use in output (when color is enabled). The format for COLOR_SCHEME is \&':::'. Numerical values and color names are accepted, empty fields imply the default color. For example, \*(T<\fB\-\-git\-color\-scheme=\fR\*(T>\*(T<'cyan:34::'\*(T> would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red). .TP \*(T<\fB\-\-all\fR\*(T> Track all branches, not only \fIdebian\fR and \fIupstream\fR. .TP \*(T<\fB\-\-debian\-branch\fR\*(T>=\fIbranch_name\fR The branch in the Git repository the Debian package is being developed on, default is \fImaster\fR. .TP \*(T<\fB\-\-upstream\-branch\fR\*(T>=\fIbranch_name\fR The branch in the Git repository the upstream sources are put onto. Default is \fIupstream\fR. .TP \*(T<\fB\-\-depth\fR\*(T>=\fIdepth\fR Git history depth, for creating shallow git clones. .TP \*(T<\fB\-\-reference\fR\*(T>=\fIrepository\fR Local repository to use as alternate instead of re-copying data from remote repository. .TP \*(T<\fB\-\-pristine\-tar\fR\*(T> Track pristine tar branch. .TP \*(T<\fB\-\-[no\-]hooks\fR\*(T> Enable running hooks. .TP \*(T<\fB\-\-postclone=\fR\*(T>\fICOMMAND\fR Execute \fICOMMAND\fR after cloning the source from the remote. Exported environment variables are: \fBGBP_GIT_DIR\fR (the repository the package is being built from). Note that if you clone a repository that contains a hook configuration in \*(T<\fIdebian/gbp.conf\fR\*(T> this hook will not be run automatically to prevent execution of untrusted code. .TP \*(T<\fB\-\-defuse\-gitattributes=\fR\*(T>\*(T<\fB[auto|on|off]\fR\*(T> Disable Git attributes that may interfere with building packages. Works by updating \*(T<\fI.git/info/attributes\fR\*(T> to override attributes in the upstream sources which may cause files to be transformed on checkout. More specifically, a new macro attribute is defined, \*(T<[attr]dgit\-defuse\-attrs\*(T>, which is then applied to \*(T<\fI*\fR\*(T> together with \*(T and \*(T. This is done to be compatible with \fBdgit\fR and \fBgit-deborig\fR which disable Git attributes this way. If set to \fIauto\fR, first check whether there are any \*(T<\fI.gitattributes\fR\*(T> files in the upstream source, and act only if there are some. If set to \fIon\fR, unconditionally there are some. If set to \fIoff\fR, does nothing. .TP \*(T<\fB\-\-repo\-email=\fR\*(T>\*(T<\fB[GIT|DEBIAN]\fR\*(T> When set to \*(T<\fBDEBIAN\fR\*(T> use the \fBDEBEMAIL\fR environment variable to set the user.email Git configuration otherwise use Git's defaults. .TP \*(T<\fB\-\-repo\-user=\fR\*(T>\*(T<\fB[GIT|DEBIAN]\fR\*(T> When set to \*(T<\fBDEBIAN\fR\*(T> use the \fBDEBUSER\fR environment variable to set the user.name Git configuration otherwise use Git's defaults. .TP \*(T<\fB\-\-[no\-]aliases\fR\*(T> Whether to expand gbp specific aliases for remote repos like \*(T. .TP \*(T<\fB\-\-[no\-]add\-upstream\-vcs\fR\*(T> Whether to add the upstream git repository as additional remote. The repository url is read from the "Repository" field in \*(T<\fIdebian/upstream/metadata\fR\*(T>. .TP \fIrepository\fR The (possibly remote) repository to clone from. This is usually a Git URL but some shortcuts are supported (see below). .TP \fIdirectory\fR The directory to clone to. .SH EXAMPLES Clone a repository and setup a tracking branch for pristine-tar as well: .PP .nf \*(T< \fBgbp\ clone\fR \-\-pristine\-tar git://honk.sigxcpu.org/git/git\-buildpackage.git\*(T> .fi .PP Clone from the \fIGit-Vcs\fR URL of a package: .PP .nf \*(T< \fBgbp\ clone\fR vcs\-git:libvirt \fBgbp\ clone\fR vcsgit:libvirt\*(T> .fi .PP Clone a repository from salsa (Debian's code hosting): .PP .nf \*(T< \fBgbp\ clone\fR salsa:agx/git\-buildpackage\*(T> .fi .PP Clone from a github repository: .PP .nf \*(T< \fBgbp\ clone\fR github:agx/git\-buildpackage\*(T> .fi .SH "CONFIGURATION FILES" Several \*(T<\fIgbp.conf\fR\*(T> files are parsed to set defaults for the above command-line arguments. See the \fBgbp.conf\fR(5) manpage for details. .SH "SEE ALSO" \fBgbp-buildpackage\fR(1), \fBgbp-pull\fR(1), \fBgbp-setup-gitattributes\fR(1), \fBgbp.conf\fR(5), \fBgitattributes\fR(5) .SH AUTHOR Guido G\(:unther <\*(T>