Git for humans
The five ideas and ten commands that cover about 90% of the work — explained with a time machine and a shared photo album, not a lecture.
Think of it as a time machine for your files
Every change you record is a snapshot — saved with a note about what you did and why. You can rewind to any moment, compare two versions, or undo a mistake without ever losing your work. GitHub is just where you keep a shared, online copy so other people can see it too.
A repo
Your project folder — except it quietly remembers itself. It's all the files in a project plus every past version of each one. When someone grabs a copy, they get the files and the whole history.
A commit
One saved snapshot of your work, with a one-line caption. You don't commit every tiny tweak — you commit at moments that make sense, like “finished the intro.”
A branch
A “what-if” side track. You work your changes there, out of the way. If it works out, you roll it back into the main line. If not, you delete the track and try another — the real thing was never touched.
main
The official, current-best version of the project. Branches are your side experiments; main is where the good stuff finally lands. (Older projects may call it “master.”)
Your computer ⇄ GitHub
Your complete private copy — full history included, and it works offline. This is where you edit and take your snapshots.
The shared, online copy — a public album anyone you allow can see. You upload snapshots here; others download them.
The bouncer — .gitignore
A tiny file at the top of your project folder. Each line is a rule saying “don't record this in any snapshot.” You set it up once, and every commit after honors it.
- Keep secrets out — passwords and API keys never ride up to GitHub.
- Skip huge folders that get rebuilt — dependencies, build output.
- Leave out personal junk that only makes sense on your own machine.
.envYour secrets — API keys, database passwordsnode_modules/A JavaScript dependency folder (huge, rebuilt each time)*.logAny file ending in a “.log”.DS_StoreInvisible Finder metadata (macOS)build/ dist/Compiled output — made fresh on every build!important.txtThe rare “un-ignore” — include one file you'd said to skipThat creates the file, then writes a rule on its own line — add as many as you want. Or without a terminal: make a blank file called .gitignore in the folder and type one pattern per line.
The whole thing — from an empty folder to GitHub
git remote add origin <url>. After that, a bare git push just works.The commands you'll actually use
Recording work, in 3 moves
A typical day, in order
- ●
git status— check where you are - ●make your edits
- ●
git add .thengit commit— record a snapshot - ●
git push— send it up to GitHub - ●Before editing more,
git pullto catch anyone else's changes
You can't lose work
Git keeps every commit around. Deleted a file? Bad typo? “Let me just undo that” is usually one step away — git status tells you exactly where you are.

