Git
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
- 1Git & repositories
Git is a tool for tracking a project's history.
- 2Clone
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.
- 3Diff: what changed
A diff is a before-and-after of your files, shrunk to only the lines that changed.
- 4Commit & push
A commit saves a snapshot of the files you choose, with a message, on your computer.
- 5Pull
Pull brings down the commits others pushed to GitHub since you last pulled, and combines them with yours.
- 6Branch & merge
A branch is a separate line of work that starts from a commit.
- 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.
- 8Undo & roll back
Undoing means going back to a version that worked.
- 9Merge conflict
A merge conflict happens when two changes edit the same lines.
- 10Pull 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.
- 11Cloud 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.