Git Workflow for Small Teams: a practical guide
A simple, proven Git workflow for teams of 2-5 developers. Feature branches, pull requests, code reviews, and branch protection — everything you need to collaborate without stepping on each other's toes.
The feature branch workflow
The simplest and most effective workflow for small teams. Every change gets its own branch, a review, and a clean merge into main.
Branch
Create a new branch from main for each feature or fix.
Commit
Make small, focused commits with clear messages describing the change.
Review
Push and open a pull request. A teammate reviews your code before merging.
Merge
After approval, merge into main and delete the branch.
Branch naming conventions
Consistent branch names make it instantly clear what each branch is for. Agree on a convention and stick to it.
feature/
New functionality or enhancement.
feature/user-loginfeature/dashboard-chartsbugfix/
Non-urgent bug fixes found during development.
bugfix/cart-total-roundingbugfix/email-validationhotfix/
Urgent production fixes that can't wait.
hotfix/security-patchhotfix/login-crashFull team workflow in the terminal
From cloning to merging — a complete collaboration cycle.
1. Clone & branch
2. Push & pull request
3. Handle merge conflicts
Pull requests and code reviews
Good PR habits
Keep PRs small and focused — one feature or fix per PR
Write a clear description explaining what changed and why
Include screenshots or test results when relevant
Respond to review comments promptly to keep momentum
Good review habits
Review within 24 hours — don't block your teammates
Be constructive and specific in your feedback
Check for logic errors, edge cases, and naming clarity
Approve when it's good enough — don't aim for perfection
Protect the main branch
Even in a team of two, never push directly to main. Branch protection is your safety net against accidental breakage.
What to enable
Require at least 1 approval before merging. Block direct pushes to main. Optionally require CI/CD checks to pass before the merge button becomes available.
Why it matters
A broken main branch blocks the entire team. Code reviews catch bugs that the author missed, spread knowledge across the team, and keep code quality consistent.
Part of the Remote & Collaboration guide
GitQuest is created by Anaïs (nouvelle fenêtre), web developer and head of education, specializing in tech training and digital accessibility.
Questions about team Git workflows
Practice team workflows in a safe terminal
GitQuest investigations simulate real team collaboration scenarios with remote repositories and merge conflicts.
Start the investigations