GitTeam Leadership 2025-05-05 3 min read

Git Branching for Teams

When multiple developers are working on the same codebase, things can get messy—fast. Code conflicts, broken features, and unclear ownership can bring progress to a halt. That’s why adopting a clear Git branching strategy isn’t optional—it’s essential.

In this post, I’ll walk through a branching model we’ve used successfully in team environments, including how we structure collaboration, manage quality assurance (QA), and protect the master branch from untested changes.

The Core Branching Strategy

At the heart of this workflow are three persistent branches:

  • master (or main)
  • release branch
  • feature/* or bugfix/*
  • hotfix/*

Feature Branch Workflow

Each developer works in their own branch, named for the feature or ticket. This ensures:

  • Work can be reviewed independently
  • Code changes are isolated
  • Developers don’t step on each other’s toes

When a feature is complete, the branch is pushed to the remote and opened as a pull request (PR) into the release branch.

QA Before release

As things are added to the release branch we have QA go in and test the work of developers. This can be done on local machines by building the release branch or using a testing/QA server. If issues are found the developer fixes their feature and merges it back into the release branch.

Releasing the branch

Once the QA work is done and the code has been pushed to the production servers the release branch is merged into the master branch. The key is to always have master branch match the production server. This way when after all the testing is done and a bug is found in prod we can deal with it using a hotfix branch

Hotfix

All the testing in the world and you will find issues in Prod that may be too serious to wait for the next planned release so in come the hotfix branch. The hotfix branch is always forked from the master/main branch. When the code is ready to be tested the testing server get build from the hotfix branch then after QA has tested is merged back into master and applicable release branches that may be in progress.

Guidelines for a Smooth Team Workflow

  • Enforce code reviews on all PRs
  • Use GitHub Actions or similar CI to run automated tests on every PR
  • Protect master with branch protection rules (e.g., require PR approval, passing tests)
  • Tag releases for traceability and rollbacks
  • Name branches clearly (e.g., feature/signup-modal, bugfix/missing-footer)

By introducing a branching strategy that separates feature development, QA testing, and production releases, teams can move faster and safer. Everyone knows where to work, where to test, and what’s going to production—no surprises, no broken code in master.

This approach has worked well for me across teams of developers, QA testers, and product owners—and it will scale as your team grows too.

Ready to scale your team and tech?

I am currently open to Development Manager, Lead Developer, and Staff Developer roles. Let's discuss how I can bring value to your organization.

© 2025 Brad Bartell.