Workflows

Feature Branch Collaboration

A practical feature-branch workflow for day-to-day teamwork, from cutting the branch and syncing main to cleaning the stack before review.

Where this workflow fits

This is the most common collaboration path: branch from main, develop in isolation, keep the branch reasonably current, clean up the history, and open review.

A safer baseline flow

git switch main
git pull --ff-only
git switch -c feature/login-validation

During development:

  • run git fetch origin regularly
  • choose merge or rebase consciously
  • keep commits readable and scoped

Before review:

git fetch origin
git rebase origin/main
git log --oneline --decorate -5

Why this workflow holds up well

  • branch boundaries stay clear
  • review scope is obvious
  • rollback and cherry-pick stay easier
  • half-finished work does not leak into main