🗺️ Branch Flow with Pull Requests (PRs)
Let's assume your repo has these main branches:
css
main ← 🟢 production / stable
acceptance ← 🟡 staging / testing
backend ← 🔵 backend dev
frontend ← 🔵 frontend dev
feature/* ← 🔧 feature branches
documentation← 📄 docs-only changes
🔄 Typical Flow (Push → PR → Merge):
plaintext
[feature/backend-login]
│
▼
Pull Request
│
▼
[backend]
│
▼
Pull Request
│
▼
[acceptance]
│
▼
Pull Request
│
▼
[main]
✅ Example Workflow
- Create a Feature Branch
git checkout backend
git pull origin backend
git checkout -b feature/backend-login
2. Do your work, commit and push:
git push origin feature/backend-login
- Open a Pull Request: From: feature/backend-login
Into: backend
Add reviewers, description, link to related issues.
- After Approval: Merge into backend, then repeat this upward:
PR from backend → acceptance
Test/stage in acceptance
PR from acceptance → main once stable
📌 Bonus: Directional Naming Diagram
plaintext
[feature/*] ──▶ [backend/frontend] ──▶ [acceptance] ──▶ [main]
▲
│
[documentation]
🔄 Each arrow is a Pull Request (PR)
✅ You only push to feature/dev branches, not main directly.
💡 Tips
Keep main protected (require PRs + code review)
Label PRs by type: feature, fix, hotfix, docs, etc.
Automate testing in acceptance branch via CI (GitHub Actions, etc.)