# Git 工作流规则 ## 🌿 分支管理 ### 分支命名规范 ```bash # 功能分支 feature/photo-upload-api feature/admin-dashboard feature/responsive-design # 修复分支 fix/photo-delete-bug fix/login-redirect-issue # 优化分支 refactor/api-structure refactor/component-organization # 文档分支 docs/api-documentation docs/deployment-guide ``` ### 分支工作流 ```bash # 1. 从主分支创建功能分支 git checkout main git pull origin main git checkout -b feature/photo-update-api # 2. 开发和提交 git add . git commit -m "feat: 实现照片更新API" # 3. 推送分支 git push origin feature/photo-update-api # 4. 创建Pull Request # 在GitHub/GitLab上创建PR # 5. 代码审查后合并 git checkout main git pull origin main git branch -d feature/photo-update-api ``` ## 📝 提交信息规范 ### 提交类型 ```bash feat: 新功能 fix: 修复bug docs: 文档更新 style: 代码格式化(不影响代码逻辑) refactor: 重构(既不是新增功能,也不是修复bug) perf: 性能优化 test: 添加测试 chore: 构建过程或辅助工具的变动 ci: CI/CD配置文件和脚本的变动 ``` ### 提交信息格式 ```bash ():