searchable reference with syntax, examples, and common flags
git checkout -b feature/my-feature - create feature branchgit add -pgit commit -m "Add feature" - commit workgit push -u origin feature/my-feature - push branchgit checkout main && git pull - update maingit merge feature/my-feature or squash merge via PRgit branch -d feature/my-feature - clean up
git checkout main && git pull - start from latest maingit checkout -b hotfix/critical-fix - create hotfix branchgit commit -m "Fix: critical bug description"git push -u origin hotfix/critical-fixgit tag v1.0.1git checkout develop && git merge hotfix/critical-fix - backport
git checkout -b release/v2.0 from developgit commit -m "Prepare release v2.0"git checkout main && git merge release/v2.0git tag -a v2.0 -m "Release v2.0"git push origin main --tagsgit checkout develop && git merge release/v2.0 - sync back