Course/Computer Basics Without Fear

5 min · +80 XP

Git, the undo history of your project

Save points for your files, and why they matter before an agent edits them.

By the end of this lesson

You will be able to ask Claude to save, show and undo changes with Git.

Git is a program that keeps a history of saved versions of a project. Each saved version is called a commit. With that history you can see what changed and return to an earlier state.

Save points in a game

In a game you save before a hard level. If it goes badly, you load the save and try again. A commit is such a save point for your project's files.

This matters before you let an agent edit a real project, because an agent can change many files in a minute. With a commit made beforehand, you can compare and go back. Claude Code also has its own checkpoints, taught later, but they do not replace Git.

You do not need to type git commands

Say it to Claude in plain words. These phrases cover almost everything a beginner needs.

💬 Start the history

“Set up git in this folder and make the first commit of everything that is here.”

Claude turns the folder into a Git project and saves the first version.

💬 Save a version

“Commit my changes with a short message that says what changed.”

Claude saves the current state as a new commit and tells you the message.

💬 See what changed

“What has changed since the last commit? Explain it in plain words.”

Claude lists the changed files and what is different in each.

💬 See the history

“Show me the last 5 commits: when each was made and what it changed.”

Claude prints a short list of recent save points.

💬 Go back

“Go back to the last commit. First tell me what I will lose.”

Claude explains what will be thrown away and waits for your yes before going back.

!Going back throws away newer unsaved work

Changes made after the last commit are lost when you return to it. That is why the phrase above asks Claude to tell you what you will lose first.

MacLinuxFor beginners
💬 Is Git on my computer?

“Is git installed on this computer? If not, install it for me and check that it works.”

On Mac and Linux it is often already there. If not, Claude installs it and asks for your approval along the way.

WindowsFor beginners
💬 Is Git on my computer?

“Is git installed on this computer? If not, tell me how to install it and check that it works afterwards.”

On Windows the install lesson suggests Git for Windows, which Claude Code also uses to run commands.

✕"Git and GitHub are the same thing"

Git works on your computer, even without the internet. GitHub is a website that stores an online copy of a Git project, for backup or for sharing. You will meet GitHub later in the course, when you need it.

For experienced users
✦If you are experienced

Commit before every large task so the diff of Claude's work is clean. Ask it to work on a branch ("create a branch called feature/budget and work there"). For parallel sessions on one repository, Claude Code supports git worktrees, covered in the power-user module.

Quick check

You are about to ask Claude to rework your whole project. What do you do first?

Facts checked against the official Claude Code docs October 24, 2026 · source

EAEvgenii Arsentev

Author

Evgenii Arsentev

PhD · Chief Executive Officer, digital health