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

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

相关推荐
wangruofeng8 小时前
Phosphor Icons 官网源码拆解:URL 即存储、水波动画与 7362 Star 图标库的架构实践
前端·架构·github
wangruofeng9 小时前
AI 画架构图总差点意思,archify 给它加了一条验收流水线
架构·github·aigc
林澈在路上11 小时前
AI翻唱软件哪个好 2026国产AI写歌工具对比推荐
大数据·人工智能·深度学习·github·aigc·音视频·音频
百变梦仔14 小时前
Codex 写前端任务时,我用这张 GitHub Skill 地图先选工具
前端·github
u13013018 小时前
GitHub 热榜项目:日榜(2026-08-29)
github
mooooooooooye19 小时前
SSH 工具越用越乱,Xterminal 先清掉这三类失效连接
运维·ssh·github
x8620 小时前
GitHub 8·17 大故障复盘:7 小时 47 分钟的容量失败与重试风暴教训
github
TunerT_TQ21 小时前
Meta|Flow 源码结构解析:一个大型 JavaScript 静态类型检查项目的工程化实践
meta·开源·github
m4Rk_21 小时前
【论文阅读】Agent 记忆机制(54):MINJA——普通用户如何仅通过查询污染 Agent 的长期记忆
论文阅读·人工智能·学习·开源·github
轮到我狗叫了21 小时前
git - 版本控制工具 - 对应的常见命令 - 以及无需后续每次手动source conda
git