tools/git-basics-where-your-work-lives-and-why-branches-are-just-pointers.md

Git Basics: Where Your Work Lives and Why Branches Are Just Pointers

Tools · 10 min read ·

Git saves your project's history as commits: snapshots you choose to take, each with a short message. The trick to understanding it is knowing that your work lives in three places: your folder, a staging area for the next commit, and the history itself.

This guide walks through git status, add, commit and log with real output, then shows that a branch is just a movable name pointing at a commit. Two hands-on simulators let you stage files, take snapshots, and grow, switch and merge branches yourself.