Practical guide · verified against the real thing
Git and GitHub for beginners, explained by a site that runs on them
In one line: Version control without the jargon: what Git remembers, what GitHub is for, and the four commands that carry most real work.
Git has a reputation for difficulty that it mostly earns from being taught backwards — commands before concepts. Start with the idea instead: Git is a time machine for a folder of files. Every commit is a save point with a label, and you can walk back to any of them. That is the entire product.
Git vs GitHub, in one paragraph
Git is the tool that runs on your computer and records history. GitHub is a website that hosts a copy of that history so a team (or you, on another machine) can share it, review it and collaborate. This very site — every guide on this desk — lives in a GitHub repository and deploys from it; when we rotate credentials, it is token hygiene we practised on it, and when we documented deployment, it was Render from that repository.
The mental model that makes commands make sense
Your folder has three states. Working directory: the files you are editing. Staging area: the basket of changes you have chosen to include in the next save. History: the committed save points. You move edits into the basket deliberately, then save the basket as one named moment. That is why there are two steps — it lets a commit tell one story ("fix the mobile menu") instead of ten.
The four commands that carry most work
git status — what state am I in? (run it constantly; it is the dashboard). git add filename — put this change in the basket (or git add . for everything). git commit -m "what and why" — save the basket as a moment. git push — upload your new moments to GitHub. Later, git pull brings a collaborator's moments down. Clone once at the start of a project to fetch the whole history to a new machine; everything else is the same four moves.
The beginner mistakes, pre-lived
Commits the size of a week ("misc changes") waste the time machine — small, story-shaped commits are what make history worth having. Merge conflicts look terrifying and are just Git showing two people edited the same lines; pick the text you want, remove the markers, commit. And commit messages addressed to your future self beat clever ones addressed to nobody.
Where to learn by doing
The Pro Git book is free online and definitive for the deep end; GitHub's own start-here docs walk the first repository in minutes. Pair it with our error-reading skill — Git's occasional refusals are just messages with names.
Sources
Next