A Git Workflow That Works for Teams of Two to Ten
Skip the heavyweight branching models. Here is a lightweight Git workflow small teams can actually follow, plus the commands worth learning properly.

Most branching models were designed for large teams shipping versioned software on a release schedule. A small team shipping continuously does not need five long-lived branches and a release manager. It needs one main branch, short-lived feature branches, and a few habits.
The workflow
main is always deployable. Every commit on it should be something you would be comfortable shipping. This one rule does more for a small team's sanity than any process document.
Work happens on short-lived branches. Branch from main, name it for the work (fix/checkout-total, feat/csv-export), and merge it back within a day or two. The longer a branch lives, the more painful the merge and the more likely two people are quietly rewriting the same file.
Every branch gets a pull request, even when the team is two people and the reviewer approves in ninety seconds. The PR is where the automated checks run and where a written record of why the change happened accumulates.
Merge to main, deploy from main. If you need a record of what shipped, tag the commit. You almost certainly do not need a separate release branch until you support multiple versions simultaneously.
Commit hygiene that pays off
Write commit messages that explain intent, not mechanics. "Fix rounding error in tax calculation for orders over 1000" is useful in six months; "fix bug" and "wip" are not. The body of the message is the right place for context — what was wrong, why this approach, what you considered and rejected.
Keep commits focused. One logical change per commit makes review faster, makes git bisect genuinely useful for hunting regressions, and makes reverting safe. If you have been committing messily on a branch — which is fine — clean it up with an interactive rebase before opening the PR.
The commands actually worth learning
git switch -c name— create and move to a branch (clearer than the oldcheckout -b).git add -p— stage changes hunk by hunk, so you can split messy work into clean commits.git commit --amend— fix the last commit before it is pushed.git rebase -i main— tidy a branch's history before review.git stash— park uncommitted work when you need to switch context.git log --oneline --graph --all— see the actual shape of your history.git bisect— binary-search your history to find the commit that introduced a bug. Underused and remarkable.git revert— undo a commit by making a new one. Safe on shared branches, unlike reset.
Rules that prevent most disasters
Never force-push to a shared branch. Force-pushing your own feature branch after a rebase is fine and normal. Force-pushing main destroys other people's work.
Pull before you start, not after you finish. Starting from stale code is how conflicts are manufactured.
Never commit secrets. Once a key is in history it is compromised even after deletion, because history is distributed. Use a .gitignore that covers environment files, and consider a pre-commit hook that scans for key patterns.
Do not commit generated files — build output, dependency directories, editor settings. They create conflicts on every merge and add nothing.
Resolve conflicts thoughtfully. Read both sides and understand what each was trying to do. Accepting one side wholesale to make the error go away is how features silently disappear.
Automate the boring checks
Run linting, formatting, type checking and tests automatically on every pull request. Formatting arguments are a waste of a small team's attention — pick a formatter, run it on save, and never discuss it again. The point of automation here is not just correctness; it is removing entire categories of conversation from code review so reviewers can focus on whether the change is a good idea.
Adopt these gradually. A small team that consistently does short branches, clear commit messages and automated checks will out-ship a team with an elaborate branching diagram nobody follows.


