git-dch;, gbp-dch;
Generate the Debian changelog from git commit messages
- Provided by: git-buildpackage (Version: 0.6.9)
- Report a bug
Generate the Debian changelog from git commit messages
gbp dch [ --verbose ] [ --debian-branch=branch_name ] [ --debian-tag=tag-format ] [ --upstream-tag=tag-format ] [ --ignore-branch ] [ --snapshot | --release ] [ --auto | --since=commitish ] [ --new-version=version ] [ --bpo | --nmu | --qa | --team ] [ --distribution=name ] [ --force-distribution ] [ --urgency=level ] [ --[no-]full ] [ --[no-]meta ] [ --meta-closes=bug-close-tags ] [ --snapshot-number=expression ] [ --id-length=number ] [ --git-log=git-log-options ] [ --[no-]git-author ] [ --[no-]multimaint ] [ --[no-]multimaint-merge ] [ --spawn-editor=[always|snapshot|release] ] [ --commit-msg=msg-format ] [ --commit ] [ --customization=customization-file ] [path1 path2]
gbp dch reads git commit messages and generates the Debian changelog from it. If no arguments are given gbp dch starts from the last tagged Debian package version up to the current tip of the current branch. If the distribution of the topmost section in debian/changelog is UNRELEASED the changelog entries will be inserted into this section. Otherwise a new section will be created.
If --auto is given gbp dch tries to guess the last Git commit documented in the changelog - this only works in snapshot mode. Otherwise --since can be used to tell gbp dch at which point it should start in the Git history.
The additional path arguments can be used to restrict the repository paths gbp dch looks at. Setting path to debian/ is a good choice if upstream uses Git and all Debian packaging changes are restricted to the debian/ subdir. In more sophisticated cases (like backports) you can use --git-log to restrict the generated changelog entries further. E.g. by using --git-log="--author=Foo Bar".
Snapshot mode can be used for quick test and install cycles without having to worry about version numbers or changelog entries.
When using --snapshot or -S gbp dch uses a pseudo header in the Debian changelog to remember the last git commit it added a changelog entry for. It also sets a version number ending in ~<snaspshotnumber>.gbp<commitid>. It automatically increments the snapshot number on subsequent invocations of gbp dch -S so that later snapshots automatically have a higher version number. To leave snapshot mode invoke gbp dch with the --release option. This removes the pseudo header and unmangles the version number so the released version has a higher version number than the snapshots.
Additional to the above options the formatting of the commit message in debian/changelog can be modified by special tags (called Meta Tags) given in the git commit message. Meta Tag processing can be activated via the --meta option. The tags must start at the first column of a commit message but can appear on any line. They are of the form Tagname: value. Valid Meta Tags are:
The following git commit message:
Document meta tags
so one doesn't have to consult the manual
Git-Dch: Short
Closes: #636088
Thanks: Raphaël Hertzog for the suggestion
Results in this debian/changelog entry:
* Document meta tags.
Thanks to Raphaël Hertzog for the suggestion (Closes: #636088)
Several gbp.conf files are parsed to set defaults for the above commandline arguments. See the gbp.conf(5) manpage for details.
gbp-buildpackage(1), gbp-import-dsc(1), gbp-import-dscs(1), gbp-import-orig(1), gbp.conf(5), debuild(1), git(1), pristine-tar(1), The Git-Buildpackage Manual <URL:file:///usr/share/doc/git-buildpackage/manual-html/index.html> Cl2vcs <URL:https://honk.sigxcpu.org/cl2vcs>,
Guido Guenther <agx@sigxcpu.org>