gbp-clone(1)

NAME
gbp-clone - Clone a repository from remote

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]] repository [directory]

DESCRIPTION
gbp clone clones a remote repository and sets up tracking branches for the debian, upstream and pristine-tar branches. This way you can easily update later using gbp pull.

OPTIONS

\FC--version\F[]
    Print version of the program, i.e. version of the git-buildpackage suite

\FC-v\F[], \FC--verbose\F[]
    Verbose execution

\FC-h\F[], \FC--help\F[]
    Print help and exit

\FC--color=\F[][auto|on|off]
    Whether to use colored output.

\FC--color-scheme=\F[]COLOR_SCHEME
    Colors to use in output (when color is enabled). The format for COLOR_SCHEME is '<debug>:<info>:<warning>:<error>'. Numerical values and color names are accepted, empty fields imply the default color. For example, \FC--git-color-scheme=\F[]\FC'cyan:34::'\F[] would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red).

\FC--all\F[]
    Track all branches, not only debian and upstream.

\FC--debian-branch\F[]=branch_name
    The branch in the Git repository the Debian package is being developed on, default is master.

\FC--upstream-branch\F[]=branch_name
    The branch in the Git repository the upstream sources are put onto. Default is upstream.

\FC--depth\F[]=depth
    Git history depth, for creating shallow git clones.

\FC--reference\F[]=repository
    Local repository to use as alternate instead of re-copying data from remote repository.

\FC--pristine-tar\F[]
    Track pristine tar branch.

\FC--[no-]hooks\F[]
    Enable running hooks.

\FC--postclone=\F[]COMMAND
    Execute COMMAND after cloning the source from the remote.

    Exported environment variables are: GBP_GIT_DIR (the repository the package is being built from).

    Note that if you clone a repository that contains a hook configuration in \FCdebian/gbp.conf\F[] this hook will not be run automatically to prevent execution of untrusted code.

\FC--defuse-gitattributes=\F[]\FC[auto|on|off]\F[]
    Disable Git attributes that may interfere with building packages. Works by updating \FC.git/info/attributes\F[] to override attributes in the upstream sources which may cause files to be transformed on checkout. More specifically, a new macro attribute is defined, \FC[attr]dgit-defuse-attrs\F[], which is then applied to \FC*\F[] together with \FCexport-subst\F[] and \FCexport-ignore\F[]. This is done to be compatible with dgit and git-deborig which disable Git attributes this way.

    If set to auto, first check whether there are any \FC.gitattributes\F[] files in the upstream source, and act only if there are some. If set to on, unconditionally there are some. If set to off, does nothing.

\FC--repo-email=\F[]\FC[GIT|DEBIAN]\F[]
    When set to \FCDEBIAN\F[] use the DEBEMAIL environment variable to set the user.email Git configuration otherwise use Git's defaults.

\FC--repo-user=\F[]\FC[GIT|DEBIAN]\F[]
    When set to \FCDEBIAN\F[] use the DEBUSER environment variable to set the user.name Git configuration otherwise use Git's defaults.

repository
    The (possibly remote) repository to clone from. This is usually a Git URL but some shortcuts are supported (see below).

directory
    The directory to clone to.

EXAMPLES
Clone a repository and setup a tracking branch for pristine-tar as well:

\FC
      gbp clone --pristine-tar git://honk.sigxcpu.org/git/git-buildpackage.git\F[]

Clone from the Git-Vcs URL of a package:

\FC
    gbp clone vcsgit:libvirt\F[]

Clone a repository from salsa (Debian's code hosting):

\FC
      gbp clone salsa:agx/git-buildpackage\F[]

Clone from a github repository:

\FC
      gbp clone github:agx/git-buildpackage\F[]

CONFIGURATION FILES
Several \FCgbp.conf\F[] files are parsed to set defaults for the above command-line arguments. See the gbp.conf(5) manpage for details.

SEE ALSO
gbp-buildpackage(1), gbp-pull(1), gbp-setup-gitattributes(1), gbp.conf(5), gitattributes(5)

AUTHOR
Guido Günther <\FCagx@sigxcpu.org\F[]>