- main: protected and only for stable, “final” code
- dev: where we combine everyone’s work and test before main
- feature branches: where each person works on a task
- No direct pushes to main
- All changes go through a Pull Request (PR)
- PRs into main need at least 1 approval
- Keep PRs focused (ideally one feature or fix)
- Create an Issue for the task
- Create a feature branch from dev
- Commit your changes to that branch
- Open a PR into dev
- When dev looks good, open a PR from dev into main
- Branch names should be short and clear, like
feature-loginorbugfix-crash - Commit messages should explain what changed, like “Add search bar” or “Fix API error”
- PR titles should clearly say what the change is
- The reviewer checks that it runs, doesn’t break anything, and matches the Issue
- If there’s a merge conflict, the PR creator fixes it
- Only merge to main when dev is stable and reviewed
- GitHub is our source of truth
- Using PRs keeps changes tracked and easy to roll back if needed