Learning Platformprototype

Day 9 — Git: Just Enough

Time: ~40 min · Date: Sun May 3

Why this matters

You'll use git on day one (the bootstrap script clones a repo from GitHub). You don't need to understand git to do that — you'll just paste the command — but a tiny bit of mental model will save you confusion later.

We're aiming for literacy, not fluency. Most of your day will not involve git at all.

The 60-second mental model

Git is time-machine "track changes" for a folder of files.

Every time you "commit" a change, git remembers the snapshot. You can:

  • Roll back to any earlier snapshot
  • See who changed what, when, and why
  • Branch off to try an experiment without affecting the main version
  • Merge experiments back in (or discard them)
  • Sync your snapshots with another copy somewhere else (like GitHub)

It's overkill for your grocery list. It's essential when you have hundreds of files that change often and other people are touching the same code.

The four words you'll see

WordWhat it means
Repository (repo)A folder being tracked by git. The folder + git's history.
CommitA saved snapshot, with a message describing the change.
PushUpload your local commits to a remote (like GitHub).
PullDownload new commits from a remote into your local copy.

That's the whole verb-set you'll use 95% of the time.

What is GitHub?

Git is the tool. GitHub is a website that hosts git repos. Like Dropbox for code.

You'll have a GitHub account. Chris's debbie-setup repo lives on GitHub. To get it on your Mac, you git clone it. That makes a local copy. When Chris updates it, you git pull to fetch his updates.

GitHub also has:

  • Issues (a to-do list for the project)
  • Pull requests (a way to propose changes for review)
  • Releases, settings, etc.

You don't need any of that yet. Cloning and pulling is enough for day one.

Visualizing the flow

Chris's local Mac          GitHub                Your Mac
   ┌─────────┐         ┌──────────┐         ┌──────────┐
   │ commit  │ ──push─►│  remote  │ ◄─pull──│  clone   │
   │         │         │   repo   │         │          │
   └─────────┘         └──────────┘         └──────────┘
  1. Chris writes code, commits it locally.
  2. Chris pushes to GitHub. GitHub now has the latest.
  3. You clone GitHub's repo to your Mac. Now you have a local copy.
  4. Later, Chris pushes more updates. You pull from GitHub to refresh your local copy.

What you'll actually do on day one

Just two commands, copy-pasted from the setup guide:

git clone https://github.com/crobison-cloud/debbie-setup.git
cd debbie-setup/mac-bootstrap
./bootstrap.sh

That's it. Git's job is done in line one. Everything after that is bash and bootstrapping.

Later, when there are updates:

cd ~/projects/debbie-setup
git pull
cd mac-bootstrap
./bootstrap.sh

Same idea. git pull updates your local copy. Re-running bootstrap.sh applies whatever changed.

Things you might see and what they mean

  • git status — shows what's changed in your repo since the last commit. ("Working tree clean" = no changes.)
  • git log — shows commit history. The list of "what's happened in this repo."
  • git diff — shows the actual differences in any modified files.
  • "fatal: not a git repository" — you're trying to run a git command in a folder git doesn't track. You're in the wrong place. cd to the right folder.
  • "Permission denied (publickey)" — your computer isn't authenticated to push/pull. We'll set this up. Doesn't affect cloning public repos.

What you do not need to learn yet

  • Branching (creating parallel versions)
  • Merging (combining branches)
  • Rebasing (rewriting history — confusing even for pros)
  • Resolving merge conflicts
  • Forks, PRs, code reviews
  • Staging vs committing

These exist. They matter when you're collaborating on code. You're not, yet. Skip.

Exercise (~20 min)

You have a GitHub account by now (if not, get one: github.com/signup).

  1. Visit your future setup repo: github.com/crobison-cloud/debbie-setup (Chris will need to invite you — text him to add <your-github-username> as a collaborator on the private repo).
  2. Click around. Notice:
    • The folder structure (mac-bootstrap, education-materials, etc.)
    • The "commits" link near the top — every change Chris has made.
    • The README on the home page.
  3. Click on any commit. See the diff — green lines added, red lines removed. This is what every commit looks like.
  4. (Optional) On your own GitHub account, create a new private repo named practice. Add a README with one line. You won't clone or use it — just feel the "create a repo" flow.

Recap

You should now be able to:

  • Define repo, commit, push, and pull in one sentence each
  • Explain the difference between git and GitHub
  • Know what git clone and git pull do conceptually
  • Recognize a diff (green/red lines) on GitHub

Going deeper (optional, ~30 min)

Watch (~10 min)

Read (~20 min)

Done?

  • Day 9 complete

Next: Day 10 — Bootstrap walkthrough (read-through)

Lesson recap

Done with this lesson?
Mark it complete to track your progress.