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

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

相关推荐
Hommy8814 小时前
【剪映小助手】贴纸处理接口
网络·开源·github·aigc·剪映小助手·视频剪辑自动化
AIMath~16 小时前
向github中上传文件过大超过50M怎么办
网络·git·github
麷飞花16 小时前
Github开源协议
github·开源协议
用户8876654266316 小时前
Git 和 GitHub 入门:从版本控制到团队协作,一篇文章讲清楚
面试·github
pipo17 小时前
从“开机全靠猜”到任意位置重定位:我做了一个 ROS 2 3D LiDAR 导航系统
github
Cosolar17 小时前
QwenPaw 源码学习指南
人工智能·架构·github
沉默王二18 小时前
每月13亿免费Token,14家AI大厂的API任你用,包括Gemini
github·claude·gemini
AIMath~20 小时前
如何将一个新的文件夹使用git 工具提交到github新仓库中
git·github
满天星830357720 小时前
【Git】原理及使用(二) (版本回退)
linux·git
Yunzenn21 小时前
深度分析字节最新研究cola-DLM 第 10 章:从文本到多模态 —— 统一生成的未来
github