Skip to content

Generating a Changelog

Uplift can generate or amend your repository's changelog (CHANGELOG.md) based on the Keep a Changelog format.

uplift changelog

Excluding Commits

You can exclude commits from the changelog by specifying a list of regex. Matching against a commit prefix is the most straightforward approach to doing this.

uplift changelog --exclude "^chore,^ci,^test"

Including Commits

The inverse behaviour is also supported. You can cherry-pick commits by specifying a list of regex. Helpful if you want to generate a changelog for a particular scope of commits.

uplift changelog --include "^.*\(scope\)"

Changing the Commit Order

Commits are written to a changelog in descending order, reflecting the behaviour of git log. Change this order by specifying asc (case insensitive).

uplift changelog --sort asc

Output the Changelog Diff

You can output the calculated changelog difference (diff) to stdout without modifying the local repository.

uplift changelog --diff-only

Migrate an Existing Repository

If your repository does not contain a CHANGELOG.md file, you can generate one that spans its entire history. A tagging structure must be in place.

uplift changelog --all

Supporting Multiline Commits

You can configure uplift to include multiline commit messages within your changelog by changing its default behaviour to truncate them to a single line.

uplift changelog --multiline

Skip Prereleases

Prevent any prerelease from being included in your changelog. Upon your next release, uplift will include any previous prerelease commits.

uplift changelog --skip-prerelease

Trim Header

Trims any lines preceding the conventional commit type in the commit message

uplift changelog --trim-header