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

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

相关推荐
徐小夕2 小时前
pxcharts 多维表格开源!一款专为开发者和数据分析师打造的轻量化智能表格
前端·架构·github
NocoBase3 小时前
GitHub 上星星数量前 10 的 AI CRM 开源项目
人工智能·低代码·开源·github·无代码
Java后端的Ai之路4 小时前
【远程仓库】- 上传本地项目到远程仓库Gitee(码云)指南
git·gitee·ssh·仓库
CoderJia程序员甲4 小时前
GitHub 热榜项目 - 日榜(2025-12-22)
ai·开源·大模型·github·ai教程
cnnews5 小时前
某讯T1刷armbian
linux·ubuntu·开源·github
bj_zhb5 小时前
git reflog用法
大数据·linux·git·github
Java后端的Ai之路5 小时前
【AI编程工具】-关闭Trae IDE的Git自动Pull开关
ide·git·ai编程·trae
GoGeekBaird14 小时前
Andrej Karpathy:2025年大模型发展总结
后端·github