You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.2 KiB
62 lines
1.2 KiB
# RuoYi-Vue Git 提交规范
|
|
|
|
## 1. Conventional Commits
|
|
|
|
### 1.1 格式
|
|
```
|
|
<type>(<scope>): <subject>
|
|
|
|
<body>
|
|
|
|
<footer>
|
|
```
|
|
|
|
### 1.2 Type 类型
|
|
- `feat`: 新功能
|
|
- `fix`: Bug 修复
|
|
- `docs`: 文档更新
|
|
- `style`: 代码格式(不影响代码运行)
|
|
- `refactor`: 重构
|
|
- `perf`: 性能优化
|
|
- `test`: 测试相关
|
|
- `build`: 构建系统或外部依赖
|
|
- `ci`: CI 配置文件
|
|
- `chore`: 其他修改
|
|
- `revert`: 回滚提交
|
|
|
|
### 1.3 示例
|
|
```bash
|
|
# 新功能
|
|
feat(user): add user export function
|
|
|
|
# Bug 修复
|
|
fix(login): fix 401 error on token expiration
|
|
|
|
# 文档更新
|
|
docs(api): update API documentation
|
|
|
|
# 重构
|
|
refactor(user): refactor user service layer
|
|
|
|
# 性能优化
|
|
perf(query): optimize database query performance
|
|
```
|
|
|
|
## 2. 分支管理
|
|
|
|
### 2.1 分支命名
|
|
- 功能分支:`feature/YYYYMMDD/feature-name`
|
|
- 修复分支:`hotfix/YYYYMMDD/bug-name`
|
|
- 重构分支:`refactor/YYYYMMDD/module-name`
|
|
|
|
### 2.2 分支策略
|
|
- `main`: 生产环境代码
|
|
- `develop`: 开发环境代码
|
|
- `feature/*`: 功能开发分支
|
|
- `hotfix/*`: 紧急修复分支
|
|
|
|
## 3. 提交频率
|
|
- 每个功能点至少 1 次提交
|
|
- 不要累积大量未提交代码
|
|
- 提交信息清晰明了
|