Git: save points

Git: mainly for the agent. Very, very good for you too.

What git is

  • Git records the history of a folder: every change, when, and why.
  • Software can’t be built without it: millions of lines, thousands of people.
  • Every change can be seen before it’s accepted, and undone after.
  • Many people work at once, and git merges their changes.

What a save point is

THE FOLDER YOU SEE practice notes.md data.csv draft.docx .git hidden: the save points INSIDE .git Coded 12 interviews Tuesday Started the paper Monday Added Table 2 today, 10:31 commit revert
  • Commit copies every file into the hidden .git folder, with a note.
  • Revert copies a save point back over your files.

Where git comes from

2005 Linus Torvalds writes git, for Linux 2008 GitHub opens 2017 Windows moves to git 2018 Microsoft buys GitHub, $7.5 billion 2021 GitHub Copilot learned from GitHub Today Your agent commits for you

The tool almost all software is built with.

Almost every developer uses it

Git: 96.65% Git 96.7% SVN: 5.96% SVN 6.0% I don't use one: 1.38% I don't use one 1.4% Mercurial: 1.22% Mercurial 1.2%

Version control used by professional developers. Stack Overflow developer survey, 2022; 53,374 answers.

GitHub: where git lives online

0M 50M 100M 150M 200M 2019 2020 2021 2022 2023 2024 2025 2026 Nov 2019: 40 million developers Dec 2020: 56 million developers Jan 2023: 100 million developers Oct 2025: 180 million developers 40M · 2019 100M · 2023 180M+ Oct 2025

Developers on GitHub, as GitHub announced them. Microsoft bought GitHub in 2018 for $7.5 billion.

Mainly for the agent

Commit a save point The agent works 40 files, 30 seconds “What changed?” every file, every line Like it? commit Hate it? revert

It changes 40 files in 30 seconds. You can’t check that by looking.

“What changed?”

paper/methods.md
− We interviewed 14 founders.
+ We interviewed 12 founders; the two pilot interviews are dropped.
tables/table2.csv
− Mean age, 41.2
+ Mean age, 40.8
notes/log.md
+ 20 Oct: dropped the pilots, reran Table 2.

Every file, every line, in one list.

The agents insist on it

Codex requires commands to run inside a Git repository to prevent destructive changes.

OpenAI’s manual for Codex. And what it says in a folder without git:

codex exec "check these facts"
Not inside a trusted directory and --skip-git-repo-check was not specified.

Very good for you too

  • Nerve. Let it try something bold. Hate it? Revert.
  • One file, every version. No more paper_v3_FINAL_jm.docx.
  • A history you can ask about. “When did we drop the pilots, and why?”

Track Changes, for a whole folder, with a note on every change.

A first save point

In your practice folder, with the agent running:

  1. “Set up git here. My name is …, my email is …”
  2. “Make a file notes.md with one line about my research. Commit it.”
  3. “Add a second line.” Then: “What changed since the last commit?”

Three minutes. Prompts with copy buttons: handout, section 2.

Save points on a line

Started the paper commit · Monday Coded 12 interviews commit · Tuesday Added Table 2 commit · 10:31 today Deleted the data folder not committed revert
  • Every commit is the whole folder, with a note.
  • Not happy since the last one? Revert.

Undo

  1. “Revert to the last commit.” The second line is gone.
  2. “Show me the history.”

Done early? “Make a branch called experiment, add a line there, then switch back to main. Where did the line go?”

Isn’t this just OneDrive?

OneDrive, Dropbox git draft.docx draft.docx interviews/ interviews/ data.xlsx data.xlsx table2.csv table2.csv “Coded” “Table 2” “Pilots out” Each file, its own versions, saved automatically. The whole folder, when you say so, with a note.

Undo the agent’s 40 edits

↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ ↺ OneDrive: 40 restores, file by file vs “Revert.” git: one sentence, all 40

OneDrive is a backup. Git is a lab notebook. Keep both.

Keep things out: .gitignore

Saved in git Kept out: .gitignore your writing your code your notes small, clean data personal data passwords and keys big files other people's PDFs junk files
  • Ignore before the first commit. After that, it’s in the history.
  • Ignored by git is not hidden from the agent. That’s the next deck.

A research project

A made-up study of founders: interviews, a survey, papers, a draft.

  1. Get it: the download prompt is in the handout, section 2.
  2. “Go into founders-study. Set up git, but don’t commit yet. Tidy the folders, and show me the plan first.”
  3. “Write a .gitignore. Explain each line in plain words.”
  4. “Commit. What did git leave out, and why?”

Check: “If I pushed this to GitHub, would anything private go along?”

The cloud: remote, push, pull

Your laptop GitHub the remote push pull Co-author push pull The same history in all three places.
  • No remote? Then nothing leaves your laptop.

Five words, one picture

YOUR LAPTOP commit a save point revert back to a save point GitHub remote the copy elsewhere push pull

You never type a git command. But the agent uses these words.

You’ll hear them back

Commit this.
Committed a1b2c3d: "Drop pilot interviews, rerun Table 2".
Is there a remote?
No remote configured. Everything is local.
Put it on GitHub as a private repository, and push.
Created founders-study (private). Pushed 3 commits to origin/main.

Careful: revert to the last commit goes back to it. Revert the last commit undoes it.

Unsure what a word means? Ask.

repodifflogbranchmerge cloneoriginmainHEADstash rebaseforktagworktree pull request.gitignore
What's a worktree? Two sentences, for a professor.
A second working folder for the same repository, on its own branch. Two agents can work on one project at once without touching each other's files.

Your turn: pick any word above, and ask.

GitHub: what it’s for

Backup laptop dead? clone it back Co-authors propose, review, merge Replication package a DOI through Zenodo A web page GitHub Pages, free GitHub

Setup, co-authors and a live demo: the GitHub deck.

A free web page: GitHub Pages

  • A folder becomes a web page. Free.
  • This course’s page is one.
  • Public is fine for teaching pages. Private? Free academic plan.

Publish this folder as a web page with GitHub Pages.

What people ask about GitHub

Who can see it?Private: you and the people you invite.
Is my data safe there?Same rules as OneDrive: nothing personal or confidential.
Can I delete it later?It stays in the history. Keep data out from the start.
Does it train AI on it?Copilot won't train on repositories it indexes, GitHub says.

Quick answers

Word and Excel files?Every version is kept, but no line-by-line "what changed".
A OneDrive folder?My advice: keep git projects outside it.
Claude Code's own undo (Esc twice)?It misses files that commands moved or deleted. Git doesn't.
Committed something by mistake?Ask before you push: it can still come out of the history.

Commit first, then courage

Before you let it loose, and again when it works.