AtomLearnAtomLearn
DashboardGoalsPathAchievementsReviewSign In
DashboardGit & Version ControlTeam Workflows & Best Practices
Git & Version ControlNot Started

Team Workflows & Best Practices

Feature branch workflow, pull requests, stashing, and commit message conventions

0%
Knowledge0%
Learn & Drill
Fluency0%
Drill & Speed
Retention0%
Mastery & Review
Confidence0%
All modes
Practice
Knowledge
Fluency
Retention

Knowledge Debt detected

You can study this freely — but your score may plateau if these foundations have gaps. The Mastery badge requires them to be solid.

Explanation

The feature branch workflow is the industry standard for team Git:

  1. 1git switch main && git pull — start from the latest main
  2. 2git switch -c feat/your-feature — create a feature branch
  3. 3Make commits on the feature branch
  4. 4git push -u origin feat/your-feature — push to remote
  5. 5Open a Pull Request (PR) on GitHub — teammates review
  6. 6Merge the PR (usually via GitHub) → branch is deleted

Pull Requests are not a Git feature — they are a GitHub/GitLab concept. A PR is a request to merge one branch into another, bundled with a diff view and a comment thread for code review.

Stashing — when you need to switch branches but have uncommitted work:

bash
git stash          # save dirty working tree to a stack
git switch main    # do something on main
git switch -        # back to your branch
git stash pop      # restore saved changes

Commit message conventions — good messages = fast debugging:

bash
# Format: <type>: <short description>
git commit -m "feat: add login with Google"
git commit -m "fix: prevent crash on empty cart"
git commit -m "refactor: extract PaymentService"
git commit -m "docs: update API auth section"

Types: feat, fix, refactor, docs, test, chore — this is the standard.

Examples

Full feature branch cycle

The full cycle: branch → commit → push → PR → merge → cleanup. Repeat for every feature or fix.

# 1. Start fresh
git switch main && git pull
# 2. Branch
git switch -c feat/user-avatar
# 3. Work, commit
git add src/Avatar.tsx
git commit -m "feat: add user avatar component"
# 4. Push and open PR
git push -u origin feat/user-avatar
# 5. After PR is merged on GitHub:
git switch main && git pull
git branch -d feat/user-avatar

Use stash to switch context mid-work

Stash is a quick way to set aside unfinished work without committing half-done changes.

# You are mid-feature when an urgent bug is reported
git stash                     # save incomplete work
git switch main && git pull   # get latest
git switch -c fix/cart-crash  # create fix branch
# fix the bug, commit, push, PR ...
git switch feat/checkout-flow
git stash pop                 # restore your work

How well did you understand this?