Step 3 · Just enough Git
Commit & push
A commit is a save point with a short note. A push sends your save points to GitHub, and that's what updates your live site.
- Commit: a save point for the whole project, with a note that says what changed. You can go back to any commit.
- Push: sends your commits to GitHub. Until then, they exist only in the working copy.
- Pull: brings down changes made somewhere else, such as on GitHub's website or from your other device.
Saving a file is not a commit. The agent saves files as it works, but nothing is in the history until it commits, and nothing is on GitHub until it pushes.
Save your work
Commit and push to main.
The agent writes a short note for the commit that says what changed.
Look back and undo
See what's been saved:
Show me the last 5 commits in plain English.
Undo a commit you already pushed. A revert adds a new commit that reverses the old one, so the record stays:
Revert the last commit and push to main.
Changed something on GitHub's website, or on your other device? Start with:
Pull the latest changes from GitHub first.
If it goes wrong
The push was rejected because GitHub has changes I don't have
Someone, maybe you on another device, pushed first. Bring those changes down, then push again:
Pull first, then push again. Don't force-push.
A force-push would overwrite the changes on GitHub.
The agent committed, but my site didn't change
The commit may not be pushed yet, or it went to a branch other than main. Ask:
Is my last commit pushed to main on GitHub? If not, push it to main.
It says there's a merge conflict
Two changes touched the same lines. Let the agent explain it before anything is overwritten:
Explain the conflict in plain English and suggest which version to keep. Don't change anything until I choose.
What the agent runs for you
git status # what changed since the last commit
git add .
git commit -m "Add St. Pete timeline"
git push origin main
git log --oneline -5 # the last 5 commits
git revert --no-edit HEAD # a new commit that undoes the last one (add -m 1 for a merge)
git pull --rebase # bring down GitHub's changes, then put yours on top
Saved only in this browser.