Lesson 05 · Overview

Git

Save points, side branches and undo that make it safe to let an AI change your project. · 11 topics
Git lesson overview — Alice and Bob save, share, branch, review, and undo

Alice and Bob build one website, and their AI helper can break it in a single answer.

After this lesson, you'll be able to save a known-good version before an AI session, work on a branch, check what changed, know how to roll back a bad change, and check a cloud agent's pull request before merging.

An AI can change twenty files in one answer. A branch and a diff let you see what changed before you keep it. Putting it online comes later.

An AI can rewrite twenty files in one answer. Git keeps a known-good version, puts risky work on a branch, and shows exactly what changed. Undo a bad session in one command; review a cloud agent's pull request before it reaches main. With these, a bad AI session costs you one command instead of a day.

What this lesson covers

  1. 1
    Git & repositories

    Git is a tool for tracking a project's history.

  2. 2
    Clone

    Clone makes a full copy of a repository from a site such as GitHub on your computer, history included, and remembers where it came from.

  3. 3
    Diff: what changed

    A diff is a before-and-after of your files, shrunk to only the lines that changed.

  4. 4
    Commit & push

    A commit saves a snapshot of the files you choose, with a message, on your computer.

  5. 5
    Pull

    Pull brings down the commits others pushed to GitHub since you last pulled, and combines them with yours.

  6. 6
    Branch & merge

    A branch is a separate line of work that starts from a commit.

  7. 7
    .gitignore

    A .gitignore file is a list of files and folders Git should act as if it can't see, such as secrets, installed packages and build output.

  8. 8
    Undo & roll back

    Undoing means going back to a version that worked.

  9. 9
    Merge conflict

    A merge conflict happens when two changes edit the same lines.

  10. 10
    Pull request & review: a safe AI workflow

    A pull request proposes a change and shows what it touched so it can be checked and discussed before it joins the main line.

  11. 11
    Cloud agents: hand off a task, review the PR

    A cloud agent is a coding agent that works on a copy of your repository on a remote machine.

Git · Vibe to Dev