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

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

相关推荐
怕浪猫8 小时前
拆解 Google《AI Agent Handbook》:企业级 Agent 的六层架构与产品矩阵
面试·github·agent
kali-Myon8 小时前
分享一个网络安全 AI 工具导航项目 SecSkills
安全·ai·github·ctf
峰向AI18 小时前
Kage: 一个 244KB 文件,做出百万级视觉效果
github
Hvitur19 小时前
Linux安装Git【离线安装】
git
m4Rk_1 天前
【论文阅读】Agent 记忆机制(74):CompassMem——从相似度检索走向事件图上的记忆导航
论文阅读·人工智能·学习·开源·github
wflynn1 天前
GitHub 日榜趋势速报 | 2026-09-18
开源·github
howard20051 天前
6.4 Git安装与配置
git·安装配置
粥里有勺糖1 天前
视野修炼第133期 | Native 回春了?
前端·github·agent
tryCbest1 天前
git实现前后端分离项目提交同一个仓库
git·gitee
Mr.朱鹏1 天前
Git 仓库同时推送到 Gitee 与 GitHub 配置指南
git·gitee·开源·github