Git checkout feels instant. One command, and you're in another branch, a different commit, a new world. But beneath that speed hides a core rule: immutability. Understanding it is the difference between clean history and chaos that spreads through your repo.
Immutability in Git means a commit never changes. Ever. Once written, it’s locked. The commit hash is a fingerprint—change anything, even a single character, and the hash changes too. Git’s entire model depends on this rule. Branches, tags, even pull requests live on top of an immutable chain. When you run git checkout, you’re not rewriting history; you’re just moving the pointer.
This is why you can jump across commits without fear of corrupting the past. But it’s also why rewriting history with git commit --amend or git rebase creates a new commit, not a modification. The old one still exists—until garbage collection wipes it. In team workflows, that difference matters. Pushing rewritten history to a shared branch can force others to reconcile divergent commits. Immutability keeps integrity, but it also enforces discipline.