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. 效果

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

相关推荐
修己xj3 小时前
解决Github QQ邮箱注册难题:绕过“Unable to verify your captcha response”错误
github
cos3 小时前
Fork 主题如何更新?基于 Ink 构建主题更新 CLI 工具
前端·javascript·git
OpenMiniServer4 小时前
当 AI 成为 Git 里的一个“人”
人工智能·git
AI首席情报员_阿布6 小时前
2026 GitHub 最火的 10 个 AI Agent 框架:普通开发者的选型指南
github
Carry3456 小时前
不清楚的 .gitignore
前端·git
阿里嘎多学长11 小时前
2026-01-11 GitHub 热点项目精选
开发语言·程序员·github·代码托管
三两肉11 小时前
HTTPS ECDHE 握手全解析
网络协议·https·github·rsa·echde
啊湘11 小时前
vscode 使用 github (适用CURSOR等使用)
ide·vscode·github·cursor·mcp
l1t12 小时前
利用DeepSeek辅助拉取GitHub存储库目录跳过特定文件方法
人工智能·github·deepseek
Hilaku12 小时前
我用 Gemini 3 Pro 手搓了一个并发邮件群发神器(附源码)
前端·javascript·github