Tuning commit messages

You can use --full to include the full commit message in the changelog. If you want to tweak the formatting there's a --customizations.

Additionally, there are tags Closes: and Thanks: available to customize the commit message. Each tag has to start at the beginning of a single line. For example, the git commit message

New upstream version

Closes: #1000
Thanks: cool upstream

would result in a changelog entry:

    * New upstream version (Closes: #1000) - thanks to cool upstream

You can use the Closes: tag multiple times.

There are several tags to further customize what (and how) commit messages get included into the changelog:

To exclude a commit from the generated changelog, use:

Gbp-Dch: Ignore

This is e.g. useful if you're just fixing up a previous commit and couldn't amend it, or for other janitorial commits that really don't need to end up in the changelog. For example, the following git commit message

Set correct branchnames in debian/gbp.conf

Gbp-Dch: Ignore

will not show up in the generated changelog in any way.

To include the full commit message in the changelog, use:

Gbp-Dch: Full

To only include the short description in the changelog and skip the body, use:

Gbp-Dch: Short

The latter only takes effect when running gbp dch with the --full option since including only the short description is the default.

Usually, changelog entries should correspond to a single Git™ commit. In this case, it's convenient to include the commit id in the changelog entry. This has the advantage that it's easy for people to identify changes without having to write very extensive changelog messages—the link back to Git™ can be automated via the Vcs-Browser and Vcs-Git fields in debian/control. See Cl2vcs for how this looks.

The inclusion of the commit id can be done automatically via gbp dch's --id-length option. Using --id-length=7 would change the above example to:

  * [571bfd4] New upstream version (Closes: #1000) - thanks to cool upstream

This makes it much easier to see which commit actually fixed bug #1000.