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

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

相关推荐
Jay-r2 小时前
开源 zh-doc-quality-gate:检查 Markdown / Word 的五类文档质量问题
人工智能·学习·开源·github·skill
艺杯羹2 小时前
零基础看懂 GitHub(Gitee 与 GitCode 通用):找资源、认界面、4 种获取方式与开源协议
git·gitee·开源·github·版本控制
老一岁2 小时前
Git详解_提交_回退_分支_合并
大数据·linux·git
阿策小和尚2 小时前
干掉 better-sqlite3,把 5 万星的 Ghost 6.81 压成 67MB 单包跑进 Dopame OS
人工智能·设计模式·github
Zucker n19 小时前
配置 GitHub SSH 密钥认证(自用笔记)
git
GoodStudyAndDayDayUp1 天前
GXW-Git规范
git
m4Rk_1 天前
【论文阅读】Agent 记忆机制(151):DUNE——让源事实更新沿依赖图传播到派生记忆
论文阅读·人工智能·学习·开源·github
这里是北京1 天前
GitHub仓库推荐:Obsidian Skills,让AI把项目笔记组织成可追溯的知识图
笔记·github
weixin_307779132 天前
Git中获取一个目录下所有文件的最后修改人的邮箱
开发语言·git·算法