git-committer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerating a git commit message
生成git提交信息
Instructions
使用说明
- Run ,
git status --short, andgit diffto gather current changes, including untracked filesgit diff --staged - If there are staged files, generate commit message suggestions using only staged changes (including staged newly added files)
- If there are no staged files, include unstaged diff changes and untracked files in the suggestion context
- For untracked files, inspect file names and content (for example with and
git status --short/cat) so they are represented in the suggested messagesed - For more context, get the last 5 to 10 commit messages as well
- Suggest a commit message:
- The commit message should be a single line
- The commit message should be a summary of the changes
- The commit message should follow conventional commit conventions
- If there too many changes, suggest multiple commit messages with a split of files between each commit message
- 运行、
git status --short和git diff来收集当前变更,包括未跟踪文件git diff --staged - 如果存在暂存文件,仅使用暂存变更(包括暂存的新增文件)生成提交信息建议
- 如果没有暂存文件,则将未暂存的diff变更和未跟踪文件纳入建议上下文
- 对于未跟踪文件,检查文件名和内容(例如通过和
git status --short/cat命令),确保这些文件在建议的提交信息中有所体现sed - 为获取更多上下文,也可以拉取最近5到10条提交信息
- 生成提交信息建议:
- 提交信息需为单行
- 提交信息需是变更内容的总结
- 提交信息需符合约定式提交规范
- 如果变更内容过多,可以建议多条提交信息,将不同文件拆分到对应提交信息中
Best practices
最佳实践
- Use present tense
- After the tag (e.g. ), the first letter should be capitalized, unless it's a symbol like a function name
feat:
- 使用现在时态
- 在标签(例如)之后,首字母应大写,除非是函数名这类符号
feat: