Git is a version control system: it records snapshots of a project over time so you can see what changed, go back, and work in parallel with others. Each commit is a full snapshot plus a pointer to the commit or commits it came from, so history forms a graph rather than a single line. A branch is just a movable label pointing at one commit, which is why creating branches is cheap. Merging joins two lines of history with a new commit that has two parents; rebasing replays your commits on top of another branch to make a straight line, rewriting them in the process. Every copy holds the full history, so you can work offline.
In this lesson: A 3D commit DAG, merge vs rebase animated, and a git bisect game.