gbp-import-ref(1)

NAME
gbp-import-ref - Update upstream sources when using Git only

SYNOPSIS
\FCgbp import-ref\F[]
[\FC--version\F[]] [\FC--help\F[]] [\FC--verbose\F[]] [\FC--color=\F[][auto|on|off]] [\FC--color-scheme=\F[] COLOR_SCHEME] [\FC--upstream-version=\F[] version] [\FC--merge-mode=\F[] [auto|merge|replace]] [\FC--upstream-branch=\F[] branch_name] [\FC--upstream-tag=\F[] tag_format] [\FC--upstream-tree=\F[] [BRANCH|VERSION|commit-id]] [\FC--debian-branch=\F[] branch_name] [\FC--[no-]sign-tags\F[]] [\FC--keyid=\F[] gpg-keyid] [\FC--postimport=cmd\F[]] [\FC--[no-]rollback\F[]]

DESCRIPTION
gbp import-ref merges upstream git commits onto your \FCdebian-branch\F[] You can either specify a branch to merge, give an upstream version or specify the commit id directly. If no tag exists for the imported commit it will be automatically created.

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--upstream-version\F[]=version, \FC-u\F[]version
    The upstream version to merge. The upstream tag to use will be determined via the \FC--upstream-tag\F[].

\FC--merge-mode=\F[][auto|merge|replace]
    How to fold the upstream commits onto the Debian packaging branch.

    merge does a Git merge leaving you on your own in case of merge conflict resolution.

    replace mode on the other hand makes the head of the Debian packaging branch identical to the newly imported tree but preserves the content of the \FCdebian/\F[] directory while keeping the current head as well as the newly imported tree as parents of the generated commit. This is similar to a \FCtheirs\F[] merge strategy while preserving \FCdebian/\F[].

    The default is auto which uses replace for 3.0 (quilt) packages and merge otherwise.

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

\FC--upstream-tag=\F[]tag-format
    Use this tag format when looking up upstream tags, default is upstream/%(version)s.

\FC--upstream-tree=\F[][BRANCH|VERSION|commit-id]
    What to merge into the \FCdebian-branch\F[]. BRANCH merges from the upstream branch. VERSION (the default) looks for a tag determined from the given upstream version number via the \FC--upstream-version\F[] option.

    Other values are interpreted as git commit id to merge from.

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

\FC--[no-]sign-tags\F[]
    GPG sign all created tags.

\FC--keyid=\F[]gpg-keyid
    Use this keyid for gpg signing tags.

\FC--import-msg=\F[]msg-format
    Use this format string for the commit message when importing upstream versions, default is New upstream version %(version)s.

\FC--postimport=\F[]cmd
    Run cmd after the import. The hook gets the following environment variables passed:

    GBP_BRANCH
        The name of the Debian packaging branch

    GBP_TAG
        The name of the just created upstream tag

    GBP_UPSTREAM_VERSION
        The just imported upstream version

    GBP_DEBIAN_VERSION
        The Debian version of the package with a Debian revision of '-1'

\FC--[no-]rollback\F[]
    Rollback changes in case of an error.

EXAMPLES
Merge commits from the \FCupstream-branch\F[] into the \FCdebian-branch\F[] creating a tag for the version 0.0~git20180524:

\FC
    gbp import-ref --upstream-tree=BRANCH -u0.0~git20180524\F[]

Merge commits from the the tag corresponding to version 1.0:

\FC
    gbp import-ref --upstream-tree=VERSION -u1.0\F[]

Merge commits given by a SHA1 creating a tag for the version 0.0~git20180524

\FC
    gbp import-ref --upstream-tree=c4398912c -u0.0~git20180524\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-import-dsc(1), gbp-import-dscs(1), gbp-dch(1), gbp.conf(5), uscan(1), debuild(1), git(1), pristine-tar(1),

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