Objective

Implement branching strategies and understand common Git workflows.

Tools & Technologies

  • git
  • GitHub Flow
  • Git Flow

Key Commands

git checkout -b feature/new-feature
git push origin feature/new-feature
git rebase main
git stash && git stash pop

Lab Steps

01
Feature Branches

Create and work on feature branches isolated from main.

02
GitHub Flow

Practice the simple GitHub Flow: branch, PR, merge, deploy.

03
Git Flow

Implement Git Flow with develop, release, and hotfix branches.

04
Stash

Use git stash to temporarily save work in progress.

Challenges Encountered

  • Rebase vs merge choice affects history readability
  • Long-lived branches accumulate painful merge conflicts

Key Takeaways

  • Short-lived feature branches minimize integration conflicts
  • Prefer rebase for local cleanup, merge for integrating public branches