gbp-setup-gitattributes(1)

NAME
gbp-setup-gitattributes - Set up Git attributes for packaging

SYNOPSIS
\FCgbp setup-gitattributes\F[]
[\FC--version\F[]] [\FC--help\F[]] [\FC--verbose\F[]] [\FC--color=\F[][auto|on|off]] [\FC--color-scheme=\F[] COLOR_SCHEME] [\FC--[no-]dgit-defuse-attrs\F[]] [\FC--all\F[]]

DESCRIPTION
gbp setup-gitattributes sets up \FC.git/info/attributes\F[] in the current Git repository to sane defaults most suitable for packaging work. At the moment, this amounts to making sure no transformations happen during checkout, commit or export. More attributes may be added in future, by default all known settings are applied.

Upstream sources may ship \FC.gitattributes\F[] files enabling certain transformations to the committed source, usually to make working with files in different encodings more convenient for the upstream authors. For Debian packaging, it is necessary to override these attributes, since they cause often unwanted conversion of files (e.g. line endings, encodings and some others). Working with such source tree is confusing, since the working tree differs from the Git history (and sometimes from the source tarball), and can lead to errors.

By default, gbp clone tries to detect the usage of \FC.gitattributes\F[] in the upstream source and disables the Git attributes only when necessary.

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--[no-]dgit-defuse-attrs\F[]
    \FCDisables all transforming attributes for all files. This is done by defining a macro attribute \F[]\FC[attr]dgit-defuse-attrs\F[]\FC and applying it to \F[]\FC*\F[]\FC together with \F[]\FCexport-subst\F[]\FC and \F[]\FCexport-ignore\F[]\FC.\F[]

    This method is compatible with dgit and git-deborig which use this macro attribute. Older versions of dgit use an incomplete preset missing some attributes; if such is found, it is replaced by an updated definition.

\FC--all\F[]
    Apply all known Git attribute settings. This is the default.

SEE ALSO
gbp-clone(1), gbp-push(1), gbp.conf(5), gitattributes(5), dgit(7)

AUTHOR
Andrej Shadura <\FCandrew@shadura.me\F[]>