Benjamin Lu

everyday is cool

A Small Site in Git

Retrospective web development exercise for the 2007 archive.

Start a local repository with an HTML file and a stylesheet. Commit the working page, change only the link color, and run git diff. The useful part is seeing the exact decision you made before you save it. Commit the color change separately from any layout work.

Open the earlier version with git show HEAD~1:site.css after the second commit. Compare it with the current file. You can read the old version without rolling back your work, which makes a small repository useful even when you’re working alone.

Further reading