Algocraft / Git Commands / git branch & checkout
A branch is just a movable pointer to a commit. HEAD tracks which one you're standing on — or lets you stand on a commit directly
git branch name: create the pointer, stay where you aregit checkout name: move HEAD to point at itgit checkout -b name does both in one stepgit switch / git restoregit branch -d refuses to delete unmerged work; -D forces it