Git & GitHub Interview Question #134
What is a good branching strategy for a small development team?
Security, Team Workflows, Troubleshooting & Senior Git/GitHub Scenarios Senior Advanced
Quick Interview Answer
A small team often benefits from a simple strategy: keep main stable, create short-lived feature or fix branches, open focused pull requests, run automated checks, review changes, and delete merged branches.
Detailed Explanation
A small team often benefits from a simple strategy: keep main stable, create short-lived feature or fix branches, open focused pull requests, run automated checks, review changes, and delete merged branches.
The best strategy depends on release frequency, team size, deployment model, and regulatory needs. Avoid adding long-lived branches and complex merge ceremonies unless they solve a real coordination problem.
Code Example
git switch main
git pull --ff-only
git switch -c feature/interview-search
# make changes
git add .
git commit -m "Add interview search"
git push -u origin feature/interview-search