红穆笔记

git cliff

高度可定製的變更日誌生成工具

100% 瀏覽器本地處理 0 數據上傳

常用示例

從 Git 倉庫所有提交生成變更日誌並保存到 `CHANGELOG.md`

git cliff > {{CHANGELOG.md}}

從最新標籤之後的提交生成變更日誌並輸出到標準輸出

git cliff {{[-l|--latest]}}

爲當前標籤對應的提交生成變更日誌(需先使用 `git checkout` 檢出到一個標籤)

git cliff --current

爲尚未打標籤的提交生成變更日誌

git cliff {{[-u|--unreleased]}}

在當前目錄生成默認配置文件 `cliff.toml`

git cliff {{[-i|--init]}}

提示:花括號{{…}}是需要替換的參數(路徑、文件名等);命令只在本機終端執行,本站不保存任何輸入。

英文原文對照

展開英文說明與示例(來源 tldr-pages)

A highly customizable changelog generator. More information

Generate a changelog from all commits in a Git repository and save it to `CHANGELOG.md`

git cliff > {{CHANGELOG.md}}

Generate a changelog from commits starting from the latest tag and print it to `stdout`

git cliff {{[-l|--latest]}}

Generate a changelog from commits that belong to the current tag (use `git checkout` on a tag before this)

git cliff --current

Generate a changelog from commits that do not belong to a tag

git cliff {{[-u|--unreleased]}}

Write the default config file to `cliff.toml` in the current directory

git cliff {{[-i|--init]}}

命令信息

命令名git cliff
用途高度可定製的變更日誌生成工具
適用平臺通用
示例數量5 條
官方文檔https://git-cliff.org/docs/usage/args/
數據來源tldr-pages(CC-BY-4.0)· 社區中文翻譯

常見問題

git cliff 命令是做什麼的?

高度可定製的變更日誌生成工具

git cliff 怎麼用?

頁面按場景列出了5 條常用示例:每條示例先說明用途,再給出可直接複製的完整命令(花括號裏是需要替換的參數)。

git cliff 最常用的操作是什麼?

從 Git 倉庫所有提交生成變更日誌並保存到 `CHANGELOG.md`:git cliff > {{CHANGELOG.md}}

命令裏的花括號是什麼意思?

花括號{{…}}表示需要替換成你自己的值,例如路徑、文件名;同名參數方括號(如 [-C|--directory])表示可選寫法。