Git for EngineersAdvanced Git

Advanced Git

Interactive rebase, bisect, worktrees, and other power tools.

~30 min read

Advanced Git

Interactive rebase

git rebase -i HEAD~5

Squash, fixup, reorder, drop, or edit commits.

git bisect

Binary-search for the commit that introduced a bug:

git bisect start
git bisect bad HEAD
git bisect good v1.0
git bisect reset

git worktree

Check out multiple branches simultaneously:

git worktree add ../hotfix hotfix/critical-bug