πŸ™

Recall Mode

INFO-I 399
show goal first. produce the command. then learn why.

What is Git, anyway?

a 90-second explanation before we start typing

Imagine you're writing an essay. You hit "Save." Five hours later, you've made it worse. You want the old version back β€” but it's gone, overwritten.

Now imagine "Save" worked differently: every save kept a permanent snapshot you could revisit. You could tag snapshots, branch off to try wild ideas, and merge them back if they worked. You could collaborate with someone editing the same essay without your changes erasing theirs.

That's Git. It's a system for tracking every version of a project, branching off to try things, and merging work from multiple people without losing anything.

Git vs. GitHub β€” they're not the same thing.
git
The tool on your laptop

A program that watches your project folder and saves snapshots when you tell it to. Works offline. Free, open-source.

github
A website that hosts Git projects

A place to put your snapshots in the cloud so teammates can see them and your laptop dying doesn't kill your work. Owned by Microsoft.

Git would still work without GitHub. GitHub couldn't exist without Git. There are alternatives (GitLab, Bitbucket) β€” same idea.

The mental model: four zones a file can live in
working dir
πŸ“
files you're editing right now
staging
πŸ›’
queued for the next save
commits
πŸ’Ύ
permanent local history
remote
☁️
github / the cloud
β†’
β†’
β†’

Almost every Git command is a verb that moves a file from one zone to the next. Once you see it that way, you stop memorizing strings and start reasoning. That's the whole game.

the analogy that sticks

Working directory = the store. You're browsing, picking things up, putting them back.

Staging = the shopping cart. You put items in the cart you actually want to buy.

Commit = checkout. The cart's contents become a permanent receipt β€” your save point.

Push = take it home. Your purchase moves from the store to your house (the cloud).

What we're about to do

You'll get five scenarios. Each one shows you a goal and an empty input box. You type the command from memory. Wrong is fine β€” that's where the learning happens. Hints escalate gently. The "why" appears after.

Total time: about 10 minutes. By the end you'll have produced the five commands that cover ~90% of what you'll do with Git for the rest of your career.