git-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Workflow & Platform Collaboration
Git Workflow & Platform Collaboration
本 Skill 旨在指导开发者规范化使用 Git,并高效利用 GitHub、Gitee 等代码托管平台进行协作。
This Skill aims to guide developers in using Git in a standardized manner and efficiently collaborating using code hosting platforms such as GitHub and Gitee.
包含的技能模块
Included Skill Modules
1. 提交规范 (Commit Convention)
1. Commit Convention
- 标准: 遵循 Conventional Commits。
- 格式:
<type>(<scope>): <description>- : 新功能
feat - : 修补 bug
fix - : 文档修改
docs - : 代码格式修改 (不影响代码运行的变动)
style - : 重构 (即不是新增功能,也不是修改 bug 的代码变动)
refactor - : 性能优化
perf - : 增加测试
test - : 构建过程或辅助工具的变动
chore
- 示例:
feat(auth): add google oauth2 login support
- Standard: Follow Conventional Commits.
- Format:
<type>(<scope>): <description>- : New feature
feat - : Bug fix
fix - : Documentation changes
docs - : Code format changes (changes that do not affect code execution)
style - : Code refactoring (changes that are neither new features nor bug fixes)
refactor - : Performance optimization
perf - : Adding tests
test - : Changes to build processes or auxiliary tools
chore
- Example:
feat(auth): add google oauth2 login support
2. 分支策略 (Branching Strategy)
2. Branching Strategy
- Trunk Based Development (推荐):
- : 随时可发布的主分支。
main - Feature branches: 短生命周期的功能分支,合并后即删除。
- Git Flow (传统):
- ,
master,develop,feature/*,release/*.hotfix/*
- Trunk Based Development (Recommended):
- : Main branch that is ready for release at any time.
main - Feature branches: Short-lived feature branches, deleted after merging.
- Git Flow (Traditional):
- ,
master,develop,feature/*,release/*.hotfix/*
3. 平台特定指南 (Platform Specifics)
3. Platform Specifics
GitHub
GitHub
- Actions: CI/CD 首选。
- Pages: 静态网站托管。
- PR: Pull Request 流程与 Code Review。
- Actions: Preferred for CI/CD.
- Pages: Static website hosting.
- PR: Pull Request process and Code Review.
Gitee (码云)
Gitee (Code Cloud)
- 国内加速: 适合国内镜像与私有项目。
- Gitee Go: 内置的 CI/CD 流水线。
- Pages: Gitee Pages 服务。
- Domestic Acceleration: Suitable for domestic mirrors and private projects.
- Gitee Go: Built-in CI/CD pipeline.
- Pages: Gitee Pages service.
🤖 智能体与 MCP 增强
🤖 Agent & MCP Enhancement
推荐智能体角色
Recommended Agent Roles
- Git Workflow Specialist: 详见 AGENTS.md。
- 专注于代码审查、提交信息规范化和发布流程管理。
- Git Workflow Specialist: See AGENTS.md for details.
- Focuses on code review, commit message standardization, and release process management.
推荐 MCP 工具
Recommended MCP Tools
- Git MCP:
- 自动执行 ,
git add,git commit。git push - 分析 git log 生成 Changelog。
- 自动执行
- GitHub MCP:
- 创建 Issue, 提交 PR, Review 代码, 管理 Releases。
- mcp-feedback-enhanced:
- 在生成 PR 描述或 Commit Message 时,如果上下文不足,使用 询问用户具体的修改原因或关联的 Issue。
ask_followup_question - 在进行 Code Review 时,使用该工具确认用户的 Review 重点。
- 在生成 PR 描述或 Commit Message 时,如果上下文不足,使用
- Git MCP:
- Automatically executes ,
git add,git commit.git push - Analyzes git log to generate Changelog.
- Automatically executes
- GitHub MCP:
- Creates Issues, submits PRs, reviews code, and manages Releases.
- mcp-feedback-enhanced:
- When generating PR descriptions or Commit Messages, if context is insufficient, use to ask users about specific modification reasons or related Issues.
ask_followup_question - During Code Review, use this tool to confirm the user's Review focus.
- When generating PR descriptions or Commit Messages, if context is insufficient, use