Claude Code for Everyone

Module 05 — Git Basics (the light version)

🎯 Goal: Understand just enough Git to protect your work with "save points." Not a Git course — a survival kit. ⏱️ Time: ~1 hour.


What is Git, in one idea?

Git is a save-point system for your projects. Like the saves in a video game, you can mark a moment ("everything works right now"), keep going, and if you break something, rewind to that save.

Why you care: when Claude Code makes changes you don't like, Git lets you undo all of them at once, cleanly. It's a safety net. That's the whole reason a non-programmer should bother with it.

You already installed Git in Module 03 (brew install git). Good.


The only 4 words you need to understand

Git has intimidating vocabulary. You need exactly four concepts:

Word Plain English
Repository ("repo") A folder that Git is watching for changes
Commit A save point — a snapshot of all your files right now
Stage (add) Choosing which changes go into the next save point
Status "What's changed since my last save point?"

That's it. Branches, merges, remotes — skip them for now. You can learn those the day you actually need them — which, for most document work, isn't yet.


One-time setup

Tell Git who you are (it labels your save points with this). Run these once, filling in your name and email:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

(Use any email — it's just a label on your local save points.)


Hands-on: turn a folder into a Git project (25 min)

Let's make a real save-point workflow in a fresh practice folder.

cd ~
mkdir git-practice
cd git-practice
code .

1. Start watching this folder:

git init

This creates a hidden .git folder. Your folder is now a "repo." You won't see the .git folder in Finder (it's hidden), and that's fine — leave it alone.

2. Create something to save. In VS Code, make a new file called plan.txt, type a sentence in it, and save (Cmd + S).

3. Check what changed:

git status

Git reports plan.txt as a new, "untracked" file (often shown in red). It's saying "I see this file, but it's not in a save point yet."

4. Stage it (choose it for the next save point):

git add plan.txt

Run git status again — plan.txt is now green ("staged"). It's ready to save.

5. Make the save point (commit):

git commit -m "Add initial plan"

The -m is the message describing this save point. Always write a short note about what changed. Now git status says "nothing to commit, working tree clean" — everything is safely saved.


Hands-on: the rewind that makes it all worth it (15 min)

  1. In VS Code, open plan.txt, delete everything, type garbage, save.

  2. Run git status — Git sees the file changed.

  3. Now undo it — restore the last saved version:

    git restore plan.txt
    
  4. Look at plan.txt in VS Code — your good version is back. You just rewound time. This is the superpower.

The habit to build: Before you let Claude Code make a big change, commit your work first (git add -A then git commit -m "before letting Claude change X"). If you don't like the result, git restore . undoes everything back to that save point. git add -A means "stage all changed files at once."


The realistic truth about Git for you

You will mostly use four commands, in this rhythm:

git status                       # what changed?
git add -A                       # stage everything
git commit -m "describe it"      # save point
git restore .                    # oh no, undo back to last save point

Claude Code can also run Git for you — you can literally say "commit my work with a sensible message" and it will. So even these four are optional once you're set up. But understanding what it's doing keeps you in control.


What about GitHub?

GitHub is a website for storing repos in the cloud and sharing them. You don't need it for personal automation work, and on a corporate laptop you should not push company-related work to a personal GitHub. We're skipping it. If your job ever requires it, that's a conversation with your team and IT.


✅ You're done with this module when

  • You can explain "commit" and "restore" in your own words.
  • You ran git init, git add, git commit in the practice folder.
  • You successfully broke a file and restored it with git restore.
  • You understand the "commit before big changes" safety habit.

Next: Module 06 — Python & uv.