| Duration | ~45 min in the lesson + ~30 min homework |
| Prerequisites | The folder and page from 0.3; the GitHub account from 0.2. |
| Checkpoint | lesson-0.4 |
What you will have
The project folder is a Git repository with at least two commits, a private copy on GitHub, and the tag lesson-0.4. The student has broken the page on purpose and restored it.
Video
The video for this lesson is not recorded yet.
Prompts used in this lesson
Part 4 — Let Claude make a change; review the diff; let Claude commit
I want visitors to see when this page was last changed. Add a small footer at the bottom of about-me.html with the text "Last updated: October 2026". Done means the footer shows at the bottom of the page in a smaller, lighter font. Constraints: edit only about-me.html, keep everything else as it is, and do not commit. I will review the change first.
I have reviewed the footer change and I accept it. Commit it to Git with a short message that says what changed. Done means git status shows nothing left to commit. Commit only about-me.html, and do not push.
Do along
Pause the video after each part named below and do the step before you continue.
- Pause after Part 3. In a plain terminal:
cd ~/brightside-site(your own folder name), then the twogit config --globalcommands. - Run
git init,git status,git add -A,git commit -m "Add about-me page",git log --oneline. - Pause after Part 4. In a second terminal, start
claudein the same folder, switch to Manual mode, and send the footer prompt from Part 4, or any small change with "do not commit". - In the plain terminal run
git statusandgit diff. Answer the three questions. - Ask Claude to commit with the second prompt from Part 4. Read the commit message before approving.
- Pause after Part 5. Break the page: delete a block from
about-me.htmlin VS Code and save. Reload the browser. Rungit restore about-me.html. Reload again. - Pause after Part 6. Create a private, empty repository on GitHub with the same name as your folder. On macOS, install the GitHub CLI and run
gh auth login. - Run
git branch -M main,git remote add originwith your own address,git remote -v,git push -u origin main. - Pause after Part 7. Run
git tag lesson-0.4,git push,git push --tags.
Check your work
- Run
git log --oneline. Expected: at least two lines, the newest marked withtag: lesson-0.4. - Run
git status. Expected: "nothing to commit, working tree clean". - Run
git tag. Expected:lesson-0.4. - Open your repository on GitHub. Expected: it is Private, lists
about-me.html, shows two or more commits, and its tags includelesson-0.4. - Open
about-me.htmlin the browser. Expected: the whole page, with the footer.
Common problems
- The commit fails asking who you are, or says your name and email "were configured automatically". → They are not set. → Run the two
git config --globalcommands; if the commit failed, commit again. fatal: not a git repository. → Wrong folder. →cdinto the project folder and repeat.error: remote origin already exists. →git remote addwas run twice. → Rungit remote set-url originfollowed by the correct address.- The push is rejected. → The GitHub repository was probably created with a README. → Delete it on GitHub, create it again empty, and push.
- The push asks for a username and password. → The sign-in helper is missing. → Press
Ctrl+C. On macOS rungh auth login; on Windows reinstall Git for Windows with the defaults. Push again. The token '&&' is not a valid statement separator(Windows). → Two commands were joined with&&, which Windows PowerShell does not accept. → Run each command on its own line.- A
.claudefolder appears ingit status. → Claude Code saved a local setting there. → Ask Claude: "Add .claude/settings.local.json to .gitignore and explain what .gitignore does."
Homework
About 30 minutes, after the lesson. No spending, and no later lesson depends on it. Task 1 changes the project: commit and push it, but do not create a tag.
The whole rhythm once more, alone. Ask Claude for one small change of wording in the paragraph or the list of
about-me.html, with "edit only about-me.html" and "do not commit". Leave the heading, the Contact section and the footer as they are; later lessons use them. Rungit statusandgit diff, write your answers to the three questions, then ask Claude to commit, and rungit pushyourself.- Deliverable: one new commit on GitHub and three written answers.
- Done when:
git statussays there is nothing to commit, GitHub shows one more commit than before, andgit tagstill prints onlylesson-0.4.
A second restore drill. Delete
about-me.htmlfrom the project folder in Finder or File Explorer. Rungit status, thengit restore about-me.html, thengit statusagain.- Deliverable: the file is back.
- Done when: the page opens in the browser, and
git statusreports a clean working tree.
Your history in your own words. Run
git log --oneline, and find the same list of commits in your repository on GitHub. In your course notes, write one line per commit saying what changed and who made the commit, you or Claude.- Deliverable: a short "My history" note.
- Done when: the note has one line for every commit in
git log --oneline.
Save your work
git tag lesson-0.4
git push
git push --tags