GitHub Copilot 一键生成中文commit提示语规则设置

文章目录

  • [1. 设置规则](#1. 设置规则)
  • [2. 效果](#2. 效果)

1. 设置规则

以idea为例:setting->Tools->GitHub Copilot->Customizations

复制以下规则到git-commit-instructions.md

md 复制代码
please generate a commit message with Chinese.
Make sure it includes an accurate and informative subject line that succinctly summarizes the key points of the changes, the response must only have commit message content and must have blank line in message template.

Below is the commit message template:

<type>(<scope>): <subject>
// blank line
<body>
// blank line
<footer>

The Header is mandatory, while the Body and Footer are optional.

Regardless of which part, no line should exceed 72 characters (or 100 characters). This is to avoid automatic line breaks affecting aesthetics.

Below is the type Enum:

- feat: new feature
- fix: bug fix
- docs: documentation
- style: formatting (changes that do not affect code execution)
- refactor: refactoring (code changes that are neither new features nor bug fixes)
- test: adding tests
- chore: changes to the build process or auxiliary tools

The body section is a detailed description of this commit and can be split into multiple lines. Here's an example:

More detailed explanatory text, if necessary. Wrap it to about 72 characters or so.

Further paragraphs come after blank lines.

- Bullet points are okay, too
- Use a hanging indent

2. 效果

以上为个人学习分享,如有问题,欢迎指出:)

相关推荐
dreams_dream2 小时前
项目想要推送多个平台仓库的方法
gitee·github
赵民勇2 小时前
Git命令详解
git
AI_Lab012 小时前
服务器管理工具要在服务器上装 Agent,安全吗?
服务器·安全·github
七牛云行业应用2 小时前
DeepSeek Harness 插件架构 vs MCP:Cordis 的「Everything is a Plugin」到底解决什么
ai·github·ai编程
u1301303 小时前
GitHub 热榜项目:日榜(2026-10-30)
人工智能·github
AlfredZhao3 小时前
新项目首次提交 GitHub 报错“未配置远端 origin”怎么办
github
miofly3 小时前
GitHub 日榜趋势速报 | 2026-10-31
开源·github
u13013015 小时前
GitHub 热榜项目:日榜(2026-10-29)
人工智能·github
穆梓兰煊16 小时前
Python 千万级向量检索内存优化手册
github
用户8371332007616 小时前
AI总是会忘记细节咋办?我用GitHub实现外部记忆管理
人工智能·github