This capstone ties together everything from the Git module. You'll take a small web project from local files to a public GitHub repository.

Setup

Use your git-blog-practice project from earlier, or start fresh:

mkdir git-capstone
cd git-capstone
git init

Build a simple three-page site:

  • index.html — blog home with links to two posts
  • about.html — about you
  • styles.css — shared styling

Use semantic HTML from the HTML module and basic CSS from the CSS module.

Part 1 — Commits and History

  1. Add a .gitignore before your first commit (see the .gitignore lesson for a starter template).
  2. Make at least four meaningful commits — not one giant commit at the end. Example progression:
    • "Add index.html skeleton"
    • "Add about page"
    • "Add shared stylesheet"
    • "Style navigation links"
  3. Run git log --oneline and confirm four distinct commits with clear messages.

Part 2 — Branch Experiment

  1. Create a branch: git switch -c feature/dark-theme
  2. Update styles.css with a dark color scheme. Commit on the branch.
  3. Switch back to main — confirm the light theme is still there.
  4. Merge the branch: git merge feature/dark-theme
  5. Delete the branch: git branch -d feature/dark-theme

Part 3 — Push to GitHub

  1. Create a new empty repository on GitHub.
  2. Connect it: git remote add origin https://github.com/YOUR-USERNAME/REPO-NAME.git
  3. Push: git push -u origin main
  4. Visit the repo in your browser and confirm all files and commits are visible.

Part 4 — Simulate Collaboration

  1. On GitHub, edit README.md directly in the browser (GitHub creates it for you if missing). Add one sentence describing your blog.
  2. Locally, run git pull to bring that change down.
  3. Make a local edit to index.html — add one new sentence to the intro.
  4. Commit and push: git push
  5. Refresh GitHub and confirm both changes are present.

Checklist

Before you finish, verify:

  • .gitignore exists and ignores at least .env and node_modules/
  • git log --oneline shows a readable history (4+ commits)
  • You successfully created, merged, and deleted a branch
  • Your repo is on GitHub with all files visible
  • git pull and git push both worked without errors

Bonus

  • Open a pull request on a feature branch instead of merging locally: push a branch, open a PR on GitHub, merge through the UI, then git pull on your machine.
  • Add a README.md locally describing your project and push it.

Congratulations — you're using Git the way professional developers do. Every project from here forward should start with git init, include a .gitignore, and live on GitHub.