๐Ÿ“ Git & GitHub

Feature Branch Workflow: How Team Projects Work ๐Ÿ”€

P
Author
PyLand Team
๐Ÿ“…
Published
06.05.2026
โฑ๏ธ
Reading time
3 min
๐Ÿ‘๏ธ
Views
358
๐ŸŒฟ
Level
Medium

Feature Branch Workflow is a team development approach where every task is done in a separate branch. It’s the most popular workflow in modern teams.

The Problem Without Branches

Imagine a team of three developers all working in main:

Morning:
  Ivan   โ€” adding a login form
  Maria  โ€” fixing a bug in the cart
  Alexey โ€” building a new page

Lunch:
  Ivan pushes โ†’ breaks Maria's code
  Maria pushes โ†’ conflicts with Ivan
  Alexey watches the chaos โ†’ can't work

Result: No one can work properly, main is constantly broken.

The Solution: Each Task Gets Its Own Branch

main  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’

         Ivan: feature/login
              โ”€โ”€โ—โ”€โ”€โ—โ”€โ”€โ—โ”€โ”€โ—โ”€โ”€โ†’ PR โ†’ merge

         Maria: fix/cart-bug
                   โ”€โ”€โ—โ”€โ”€โ—โ”€โ”€โ†’ PR โ†’ merge

         Alexey: feature/catalog
                      โ”€โ”€โ—โ”€โ”€โ—โ”€โ”€โ—โ”€โ”€โ†’ PR โ†’ merge

Everyone works independently. main is stable and always ready to deploy.

The Full Workflow

1. Start with an up-to-date main

git checkout main
git pull origin main  # get the latest changes

In GitHub Desktop: switch to main โ†’ Fetch origin โ†’ Pull.

2. Create a branch

git checkout -b feature/user-profile

In GitHub Desktop: Branch โ†’ New Branch โ†’ name your branch.

Naming conventions:

Type Pattern Example
New feature feature/name feature/user-profile
Bug fix fix/name fix/login-crash
Documentation docs/name docs/api-guide
Refactoring refactor/name refactor/auth-module

3. Work and commit

# Done part of the work
git add .
git commit -m "feat: add profile page"

# More changes
git commit -m "feat: avatar upload"

# Fixed something
git commit -m "fix: username validation"

4. Push the branch

git push origin feature/user-profile

In GitHub Desktop: Push origin (or Publish branch on first push).

5. Create a Pull Request

GitHub will show a banner: “Compare & pull request”. Click it.

Fill in the description:
- What was done
- Why
- How to test

6. Go through code review

Reviewer looks at the code and leaves comments.
You make changes and push โ€” the PR updates.

7. Merge and delete the branch

After Approve: Merge pull request โ†’ Delete branch.

# Locally: switch to main and update
git checkout main
git pull origin main
git branch -d feature/user-profile  # delete local branch

Multiple Tasks in Parallel

The main strength of Feature Branches is handling several tasks simultaneously:

# Working on the login feature
git checkout feature/login

# A critical bug came in โ€” switch over
git checkout main
git checkout -b fix/critical-bug

# Fixed the bug, merged via PR
# Back to the login feature โ€” nothing lost
git checkout feature/login

Without branches you’d have to stash or revert unfinished work.

Branch Lifecycle

Created from main  โ†’  Work  โ†’  PR  โ†’  Review  โ†’  Merge  โ†’  Deleted
     โ†‘                                               โ†“
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Review fixes โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

A branch lives exactly as long as it’s needed. After merge โ€” it’s deleted.

What If main Updated While I Was Working?

Another developer merged their PR while you were working in your branch.
You need to update your branch:

git checkout feature/my-feature
git merge main  # pull updates from main into your branch

In GitHub Desktop: Branch โ†’ Update from default branch.

If there’s a conflict โ€” see Resolving Merge Conflicts.

Rules of Good Practice

Small branches โœ…

feature/add-email-field  โ†’ 50 lines changed โ†’ 1 hour of review

vs

feature/redesign-everything โ†’ 3000 lines โ†’ reviewer cries

Small PRs get merged faster. Large ones “hang” for weeks.

One task โ€” one branch โœ…

# Good: each task in its own branch
feature/add-login
feature/add-registration
fix/password-validation

# Bad: everything in one branch
feature/auth-system  # login, registration, fix, and refactoring all in one...

Descriptive branch names โœ…

The branch name should make its purpose clear:

โœ… feature/user-avatar-upload
โœ… fix/cart-total-calculation
โŒ my-branch
โŒ test
โŒ new-stuff

Feature Branch in Different Teams

GitHub Flow (simple)

main โ†’ feature branch โ†’ PR โ†’ merge into main โ†’ deploy

Used in most small teams and open source projects.

Git Flow (complex)

main โ†’ develop โ†’ feature โ†’ develop โ†’ release โ†’ main

Used in teams with defined release cycles.

For learning and most projects, GitHub Flow is sufficient.

Summary

Feature Branch Workflow means:

  1. Isolation โ€” each task in its own branch
  2. Stability โ€” main always works
  3. Review โ€” code is checked before merge
  4. History โ€” clear record of what was added and when

This is the approach used at most tech companies worldwide โ€” from small startups to Google and Microsoft.

Your reaction to the article

๐Ÿ’ฌ Comments (0)

๐Ÿ” Sign in to leave a comment
๐Ÿšช Login
๐Ÿ’ญ

No comments yet

Be the first to share your opinion about this article!

๐Ÿ”— Similar

Similar articles

Continue learning with these materials

๐Ÿ“

Undo and Revert in GitHub Desktop: Fix Mistakes Wโ€ฆ

A commit is not a point of no return. GitHub Desktop lets you rebuild a...

๐Ÿ“… 16.07.2026 ๐Ÿ‘๏ธ 359
๐Ÿ“

History, Diffs, and Web Commits on GitHub

GitHub lets you read repository history, inspect individual commit diffs, view the history of one...

๐Ÿ“… 16.07.2026 ๐Ÿ‘๏ธ 312
๐Ÿ“

Your First Git Commit

Your first commit starts with initializing a repository, configuring the author identity, and selecting the...

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 343
๐ŸŽ“ Continue learning

Courses that cover this material

Visit the course to apply this material in practice.

Git & GitHub Desktop: Teamwork Without the Pain Open course curriculum Markup for Backend Developers Open course curriculum