gbp-setup-gitattributes(1)
π gbp-setup-gitattributes β the git-buildpackage manual, bestie edition π
okay so you found your way into the gbp-setup-gitattributes(1) page of the git-buildpackage Manual and honestly? you're in the right place. let's get into it π
β¨ NAME β¨
gbp-setup-gitattributes β Set up Git attributes for packaging
β¨ SYNOPSIS β¨
gbp setup-gitattributes [--version] [--help] [--verbose]
[--color=[auto|on|off]] [--color-scheme=COLOR_SCHEME]
[--[no-]dgit-defuse-attrs] [--all]
β¨ DESCRIPTION β¨
so gbp setup-gitattributes sets up .git/info/attributes in the current Git repository, and it fills it with sane defaults that are the most suitable for packaging work. at the moment, that basically means making sure no transformations happen during checkout, commit or export. more attributes might get added in the future, but by default all known settings are applied. π
here's the tea though π: upstream sources may ship .gitattributes files that enable certain transformations on the committed source β usually so the upstream authors have an easier time working with files in different encodings. cute for them! but for Debian packaging, it's necessary to override these attributes, because they often cause unwanted conversion of files (e.g. line endings, encodings and some others). working with a source tree like that is straight up confusing, because the working tree differs from the Git history (and sometimes from the source tarball), and it can lead to errors. not the vibe. π
by default, gbp clone tries to detect the usage of .gitattributes in the upstream source and disables the Git attributes only when necessary. icon behaviour, honestly. π
β¨ OPTIONS β¨
--versionβ print the version of the program, i.e. the version of the git-buildpackage suite. that's it, that's the whole thing. π-v,--verboseβ verbose execution. it says more stuff. you get more lore. π¦-h,--helpβ print help and exit. the classic escape hatch. π--color=[auto|on|off]β whether to use colored output. yes, no, or let it decide. π--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 both 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). lowkey a whole aesthetic. π--[no-]dgit-defuse-attrsβ disables all transforming attributes for all files. how? by defining a macro attribute[attr]dgit-defuse-attrsand applying it to*together withexport-substandexport-ignore. this method is compatible withdgitandgit-deborig, which use this macro attribute. heads up bestie: older versions ofdgituse an incomplete preset missing some attributes; if such a one is found, it gets replaced by an updated definition. glow-up, but make it a fix. β¨--allβ apply all known Git attribute settings. this is the default, so like, you already have it, but slay for being explicit. π
β¨ SEE ALSO β¨
gbp-clone(1), gbp-push(1), gbp.conf(5), gitattributes(5), dgit(7)
go read those too, iykyk π«Ά
β¨ AUTHOR β¨
Andrej Shadura <andrew@shadura.me> β thank you for your service, we are obsessed. π
and that's the whole page, bestie!! this was the gbp-setup-gitattributes(1) page from the git-buildpackage Manual, dated 26 May 2026. periodt. π
β¨π
π¦ 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