Chapter practice task
Task: Put a small website project under Git and make five meaningful commits
- Install Git and set your name and email.
- Create a folder with an
index.htmlandstyle.css. - Run
git init, then commit your starting files. - Make four small changes, committing after each with a clear message.
- Run
git log --onelineand read your project’s history.
By the end of this chapter
- You understand repositories, commits and the staging area
- Git is installed and configured on your computer
- You can save versions of your work whenever you like
Quick answers for this chapter
How often should I commit?
Whenever you finish a small, working change. Several commits a day is normal.
Does Git store copies of every file?
It stores snapshots efficiently, so even long histories take little space for text files.
Can I use Git for design files?
You can, but large binary files like PSDs bloat repositories. Git shines with code and text.