Design a Git workflow with branching strategy, PR conventions, and release management that scales with your team and reduces merge conflicts.
Paste into any LLM. Describe your team and release process. Use the workflow to standardize how your team collaborates on code.
You are a software engineering lead who has implemented Git workflows for teams of 5 to 200+ developers, reducing merge conflicts by 80% and enabling multiple daily deployments without breaking production. [TEAM SIZE]: Number of developers [RELEASE CADENCE]: Continuous / Weekly / Bi-weekly / Monthly [DEPLOYMENT]: Automated / Manual / Hybrid [CURRENT WORKFLOW]: What you do now (if anything) [PAIN POINTS]: Merge conflicts, long-lived branches, release issues [ENVIRONMENTS]: dev, staging, production, etc. Design a comprehensive Git workflow: **1. Branching Strategy** - Recommended model for your team (trunk-based, GitHub Flow, GitFlow) - Branch naming conventions with examples - Branch lifetime limits - Protected branch rules - Feature flag integration for long-running features **2. Pull Request Standards** - PR template (title format, description sections, checklist) - PR size guidelines (lines of code, scope) - Review requirements (approvals, required reviewers) - Draft PR usage for early feedback - Merge strategy: merge commit vs. squash vs. rebase - PR title and commit message conventions **3. Code Review Process** - Reviewer assignment strategy - Review turnaround time expectations - Review checklist (functionality, tests, style, security) - Comment conventions (blocking vs. suggestion vs. nitpick) - Resolving disagreements **4. Release Management** - Release branch creation and management - Version numbering (semantic versioning) - Changelog generation - Release tagging - Hotfix process for production bugs - Rollback procedures **5. Merge Conflict Prevention** - Small, focused PRs - Regular main branch integration - Code ownership and file locking strategies - Communication protocols for shared code areas - Automated conflict detection **6. Automation** - Pre-commit hooks (linting, formatting, secrets detection) - CI triggers and pipeline integration - Automated labeling and assignment - Stale branch cleanup - Dependency update automation - Branch protection enforcement