name: git description: Git工作流管理,包括分支验证、提交规范、PR准备和仓库健康检查。
Git工作流技能
Git工作流管理,包括分支验证、提交规范、PR准备和仓库健康检查。
激活
关键词自动激活:git、branch、commit、pull request、PR、merge、rebase、workflow、conventional commits、branch strategy
工作流
分支管理
提交管理
- commit.md: 规范提交消息准备
PR工作流
- pr-prepare.md: 拉取请求描述生成
- pr-check.md: PR验证和检查清单
上下文文件
- conventional-commits.md: 提交消息格式标准
- branch-strategies.md: 分支命名和工作流模式
命令
# 检查分支状态
git branch --show-current
git status
# 验证分支命名
# 分支格式:{type}/{descriptive-slug}
# 类型:feat, fix, docs, refactor, perf, test, chore, hotfix
# 创建规范提交
git commit -m "$(cat <<'EOF'
{type}({scope}): {description}
{body}
{footer}
EOF
)"
语义化发布映射
| 分支前缀 | 提交类型 | 版本影响 |
|---|---|---|
| feat/ | feat: | 次要版本 (0.X.0) |
| fix/ | fix: | 补丁版本 (0.0.X) |
| docs/ | docs: | 不发布 |
| refactor/ | refactor: | 不发布 |
| perf/ | perf: | 补丁版本 (0.0.X) |
| test/ | test: | 不发布 |
| chore/ | chore: | 不发布 |
| hotfix/ | fix: | 补丁版本 (0.0.X) |