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

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

相关推荐
掘根13 小时前
【jsonRpc项目】发布/订阅模块
github
weixin_4624462313 小时前
Git 本地忽略 application-dev.yml 的最佳实践:不提交 .gitignore,不影响团队协作!
git
森之鸟16 小时前
2026年AI编程工具全景图:GitHub Copilot vs Cursor vs Codeium,我如何选择?
github·copilot·ai编程
wAIxiSeu18 小时前
Github开源项目推荐
开源·github
无限进步_21 小时前
面试题 02.02. 返回倒数第 k 个节点 - 题解与详细分析
c语言·开发语言·数据结构·git·链表·github·visual studio
CoderJia程序员甲21 小时前
GitHub 热榜项目 - 日榜(2026-01-31)
ai·开源·大模型·github·ai教程
2401_8590490821 小时前
git submodule update --init --recursive无法拉取解决
前端·chrome·git
飞乐鸟1 天前
Github 16.8k Star!推荐一款开源的高性能分布式对象存储系统!
分布式·开源·github
是店小二呀1 天前
Git 深度学习笔记:从初始化到核心操作机制解析
笔记·git
xlq223221 天前
11.git_gbd
git