← 返回命令列表

Linux command

git-cliff 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Generate changelog

git cliff

Generate since tag

git cliff --tag [v1.0.0]

Output to file

git cliff -o CHANGELOG.md

Preview unreleased

git cliff --unreleased

Custom config

git cliff --config [cliff.toml]

说明

git cliff generates changelogs from git history using conventional commit conventions. It parses commit messages to categorize changes and produces formatted output. The tool is highly configurable through TOML files, supporting custom Tera templates, commit groups, scope-based filtering, and conditional sections. It integrates with CI/CD pipelines for automated release documentation. git cliff supports conventional commits, Angular-style commits, and custom parsing rules, producing professional changelogs in Markdown, AsciiDoc, or custom template formats.

参数

-o _FILE_, --output _FILE_
Output file.
--tag _TAG_
Process commits until tag.
--unreleased
Only process unreleased commits.
-c _FILE_, --config _FILE_
Configuration file.
--prepend _FILE_
Prepend to existing file.
--context
Print template context.
--help
Display help information.

FAQ

What is the git-cliff command used for?

git cliff generates changelogs from git history using conventional commit conventions. It parses commit messages to categorize changes and produces formatted output. The tool is highly configurable through TOML files, supporting custom Tera templates, commit groups, scope-based filtering, and conditional sections. It integrates with CI/CD pipelines for automated release documentation. git cliff supports conventional commits, Angular-style commits, and custom parsing rules, producing professional changelogs in Markdown, AsciiDoc, or custom template formats.

How do I run a basic git-cliff example?

Run `git cliff` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o _FILE_, --output _FILE_ do in git-cliff?

Output file.