In short
Git is a version control tool that takes snapshots of your project, called commits, so you can always go back to a working version. Think of it as an unlimited, labelled undo history for your whole project. Every time you save a commit, Git records exactly what changed and lets you return to that point later, which removes the fear that stops beginners from experimenting. Git runs on your own computer and works completely offline.
Why Git matters
Without version control, a bad edit can wreck hours of work and there is no clean way back. With Git, a bad edit is never a disaster because you just return to the last good commit. It also lets more than one person work on the same project without overwriting each other, and it is the foundation that services like GitHub build on.
The core workflow
The everyday loop is small: you change files, stage the ones you want to save, then commit them with a short message describing what changed. Your AI agent often runs these for you, but it helps to recognise them.
git status # see what changed
git add . # stage all changes
git commit -m "Add hero section" # save a labelled snapshotCommon beginner confusions
Git is not the same as GitHub. Git is the tool on your computer; GitHub is a website that stores a copy of your Git project online. A "commit" is a save point in Git, not the same as saving a file in your editor; you can save a file many times and only commit once you are happy. And committing does not publish anything to the internet by itself. People also worry about branches early on, but you do not need them to start. A branch is just a parallel line of work you can try without touching your main version, and for a solo beginner you can happily ignore branches until a project gets bigger. The single habit that matters most is committing often with clear messages, so your history reads like a story of what you did and you can always step back to any point.
