Web development · Lesson 06
Keep a trail of your work
Use Git to record progress and a simple method to investigate bugs.
- Explain what a Git commit records
- Use a repeatable debugging loop
Helpful background: A small page or code example you can change.
A commit is a checkpoint
Git records a snapshot of selected file changes. A useful commit has a focused change and a message that says what changed. Checkpoints let you review how your project evolved.
Debug in small steps
First reproduce the issue. Then describe what you expected and what happened. Inspect the relevant code and browser console, change one thing, and try again.
Share context with your future self
A README can explain what the project does, how to open it, and what you learned. A clear project page makes your work easier for another person to understand.
git status
git add index.html styles.css
git commit -m "Add responsive homepage layout"What makes a commit message useful?
Your turn
A button works in one browser but not another. Write down the first three things you would check before changing code.
Reproduce it, note the expected and actual result, then inspect the console and the relevant event handler before changing one thing at a time.
BUILT TOGETHER
Help make this explanation better.
Have a clearer explanation, a useful example, or a correction? Share it with the community.
Be the first to add your name when you improve this lesson.
How to get credited