website/blog/git-cliff-2.6.0.md
git-cliff is a command-line tool (written in Rust) that provides a highly customizable way to generate changelogs from git history.
It supports using custom regular expressions to alter changelogs which are mostly based on conventional commits. With a single configuration file, a wide variety of formats can be applied for a changelog, thanks to the Jinja2/Django-inspired template engine.
More information and examples can be found in the GitHub repository.
The full changelog can be found here.
The following fields are deprecated and will be removed in the next releases:
commit.github, commit.gitea, commit.gitlab, commit.bitbucketYou can now use the commit.remote field instead. For example:
-{% if commit.github.username %}
+{% if commit.remote.username %}
If you have diverged branches for your project and want to changelog for each branch, you can now use the --use-branch-tags option.
$ git cliff --use-branch-tags
The generated changelog above will only include the tags from the current branch.
Also, you can use it from the configuration file:
[git]
use_branch_tags = true
:::info
See the implementation for more explanation and the coolest hand-drawn diagram ever!
:::
Do you want to always render the changelog even if there are no changes? Boom, now you can now use the render_always option:
[changelog]
render_always = true
This is pretty self-explanatory:
[changelog]
output = "CHANGELOG.md"
This option does not take precedence over command-line arguments which means you can override it with the --output option.
We added the missing options and documented all options with tsdoc comments.
Also, we improved the skipCommit option to accept an array of values.
:::info
See the implementation for more information.
:::
We now remove the trailing newline for commits, which means you can use $ anchor in your regular expressions:
[git]
commit_preprocessors = [
# remove the issue number at the end of the commit message (e.g. #123)
{ pattern = ' #\d+$', replace = ""}
]
The example templates are now more intuitive and conventionally correct. We removed the non-beginner-friendly options and changed the defaults to be easier to start with. Weheee!
--bumped-version is used (#855) - (8bebbf9)--from-context (#820) - (ff72406)Any contribution is highly appreciated! See the contribution guidelines for getting started.
Feel free to submit issues and join our Discord / Matrix for discussion!
Follow git-cliff on Twitter & Mastodon to not miss any news!
If you liked git-cliff and/or my other projects on GitHub, consider donating to support my open source endeavors.
Have a fantastic day! ⛰️