← ClaudeAtlas

git-flow-conventionslisted

Git Flow 分支管理与提交规范指南。当用户进行分支操作、合并代码、提交 PR/MR、 规划发版��修复线上 Bug、或询问 Git 协作规范时使用。覆盖完整 Git Flow 模型 (develop/feature/release/hotfix)、分支命名规范、commit message 格式、 PR 提交流程和最佳实践。触发场景包括:创建分支、合并代码、git commit、发版、 hotfix、分支命名、PR 描述、代码审查提交。
toRolex/rolex-skills · ★ 0 · Code & Development · score 70
Install: claude install-skill toRolex/rolex-skills
# Git Flow 分支管理与提交规范 基于 Vincent Driessen 的 A Successful Git Branching Model,指导团队按 GitFlow 进行分支操作、提交和合并。 完整分支模型、命名规范、红线、对比矩阵见 [`references/gitflow.md`](references/gitflow.md)。 ## 操作命令速查 ### Develop 分支初始化 ```bash git branch develop git push -u origin develop ``` ### Feature 分支 **开始开发**: ```bash git checkout -b feature/<功能名> develop git push -u origin feature/<功能名> ``` **提交代码**: ```bash git add . git commit -m "feat(<模块>): <简述>" ``` **合并回 develop**(使用 `--no-ff` 保留分支 commit 历史): ```bash git checkout develop git pull origin develop git merge --no-ff feature/<功能名> git push origin develop ``` **清理**: ```bash git branch -d feature/<功能名> git push origin --delete feature/<功能名> ``` ### Release 分支 **开始发版**: ```bash git checkout -b release/<版本号> develop ``` **完成发版**: ```bash # 合并到 master git checkout master git merge --no-ff release/<版本号> git push origin master # 合并回 develop git checkout develop git merge --no-ff release/<版本号> git push origin develop # 打 tag + 清理 git tag -a v<版本号> -m "Release v<版本号>" git push --tags git branch -d release/<版本号> git push origin --delete release/<版本号> ``` ### Hotfix 分支 **开始修复**: ```bash git checkout -b hotfix/<版本号> master ``` **完成修复**: ```bash # 合并到 master git checkout master git merge --no-ff hotfix/<版本号> git push origin master # 合并回 develop git checkout develop git merge --no-ff hotfix/<版本号> git push origin develop # 打 tag + 清理 git tag -a v<版本号> -m "Hotfix v<版本号>" git push --tags git branch -d hotfix/<版本号> git push origin --delete hotfi