| 结构 | 主题行 / 空行 / 正文 /(可选)footer |
|---|---|
| 多段 | 多个 -m 依次拼接 |
| 从文件 | git commit -F msg.txt |
常用示例
常用示例
git commit -m 'fix(api): handle empty response' -m 'Retry once on 502; add regression test.'
git commit -F msg.txt
git log -1 --format=%B主题行说明「做了什么」,正文说明「为什么这么做」;把评审者关心的问题写清楚,比复述 diff 有价值。