---
name: "gbp-tag"
section: "1"
platform: "linux"
package: "git-buildpackage"
version: "0.9.38"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gbp-tag"
---

# gbp-tag(1)

Tag a Debian release in a Git repository

## NAME

gbp-tag - Tag a Debian release in a Git repository

## SYNOPSIS

FC**gbp tag**F\[0\]  \[FC**--version**F\[0\]\] \[FC**--help**F\[0\]\] \[FC**--verbose**F\[0\]\] \[FC**--color=**F\[0\]\[auto\|on\|off\]\] \[FC**--color-scheme=**F\[0\] *COLOR\_SCHEME*\] \[FC**--ignore-branch**F\[0\]\] \[FC**--\[no-\]ignore-new**F\[0\]\] \[FC**--\[no-\]sign-tags**F\[0\]\] \[FC**--keyid=**F\[0\] *GPG-KEYID*\] \[FC**--debian-branch=**F\[0\] *BRANCH\_NAME*\] \[FC**--debian-tag=**F\[0\] *tag-format*\] \[FC**--debian-tag-msg=**F\[0\] *tag-msg-format*\] \[FC**--posttag=**F\[0\] *COMMAND*\] \[FC**--retag**F\[0\]\]

## DESCRIPTION

**gbp tag** tags the current head commit appropriately. It will in order:

- •

  Verify that it is being executed from the Debian branch.

- •

  Verify that the repository doesn't contain any uncommitted source changes.

- •

  Create a git tag using the information from FC*debian/changelog*F\[0\].

- •

  (Optionally) call a post tag hook.

## OPTIONS

- FC**--version**F\[0\]

  Print version of the program, i.e. version of the git-buildpackage suite

- FC**-v**F\[0\], FC**--verbose**F\[0\]

  Verbose execution

- FC**-h**F\[0\], FC**--help**F\[0\]

  Print help and exit

- FC**--color=**F\[0\]\[auto\|on\|off\]

  Whether to use colored output.

- FC**--color-scheme=**F\[0\]*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\[0\]FC'cyan:34::'F\[0\] would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red).

- FC**--posttag=**F\[0\]*COMMAND*

  Execute *COMMAND* after creating the tag.

  Exported environment variables are: **GBP\_TAG** (the name of the generated tag), **GBP\_BRANCH** (the branch the package was built from) and **GBP\_SHA1** (the sha1 of the commit the tag was created at).

- FC**--\[no-\]sign-tags**F\[0\]

  GPG sign all created tags.

- FC**--keyid=**F\[0\]*GPG-KEYID*

  Use this keyid for gpg signing tags.

- FC**--debian-tag=**F\[0\]*TAG-FORMAT*

  Use this tag format when tagging Debian versions, default is *debian/%(version)s*.

- FC**--debian-tag-msg=**F\[0\]*tag-msg-format*

  Use this tag message format when signing Debian versions, default is *%(pkg)s Debian release %(version)s*

- FC**--retag**F\[0\]

  Don't fail tag operations if a tag with the same version already exists. This is a command line only option that cannot be specified via FC*gbp.conf*F\[0\].

- FC**--debian-branch**F\[0\]=*BRANCH\_NAME*

  If you're not on this branch when invoking **gbp tag** it will fail. Default is *master*. This is done to make sure you don't accidentally tag on the wrong branch. Not being on this branch will be ignored when using FC**--ignore-branch**F\[0\].

- FC**--ignore-branch**F\[0\]

  Don't check if the current branch matches *DEBIAN-BRANCH*.

- FC**--\[no-\]ignore-new**F\[0\]

  Don't abort if there are uncommitted changes in the source tree or the current branch doesn't match the *DEBIAN-BRANCH*.

## EXAMPLES

Create a tag with the current defaults

```
FC
      gbp tag
    F[0]
```

Create using a more upstreamish tag format:

```
FC
      gbp tag --debian-tag='v%(version)s'
    F[0]
```

## CONFIGURATION FILES

Several FC*gbp.conf*F\[0\] files are parsed  to set defaults for the above command-line arguments. See the [**gbp.conf**(5)](/gbp.conf/5.md) manpage for details.

## SEE ALSO

[**gbp-buildpackage**(1)](/gbp-buildpackage/1.md), [**gbp-push**(1)](/gbp-push/1.md), [**gbp.conf**(5)](/gbp.conf/5.md),

## AUTHOR

Guido Günther \<FCagx@sigxcpu.orgF\[0\]\>
