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

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

相关推荐
贺小涛11 小时前
Git代码提交规范和踩坑排水明沟
大数据·git·elasticsearch
IT二叔11 小时前
Git Flow02-开发步骤
git
2401_8916558111 小时前
GitHub镜像站搭建全攻略技术文章大纲
python·github
I'm Jie11 小时前
MacOS 国内镜像一键安装 Homebrew
git·macos·homebrew
IT二叔11 小时前
Git Flow04-bug修改流程
git·bug
※※冰馨※※11 小时前
【C++】通过 Git 访问阿里云 Codeup 仓库
git·阿里云·云计算
草梅友仁11 小时前
墨梅博客 1.10.0 发布与 AI 编程工作流优化 | 2026 年第 12 周草梅周报
开源·github·ai编程
badhope18 小时前
Mobile-Skills:移动端技能可视化的创新实践
开发语言·人工智能·git·智能手机·github
zhangfeng113320 小时前
Windows 的 Git Bash 中使用 md5sum 命令非常简单 md5做文件完整性检测 WinRAR 可以计算文件的 MD5 值
人工智能·windows·git·bash
TonyLee01721 小时前
Github使用记录
github