Steps — Stage 9: Edit, Commit, Push Again
Prerequisites
Completed Stage 8. Your GitHub repo has four commits. You are on main.
Steps
1. Edit index.html
Inside the <div class="scoreboard">, add a third paragraph after the Lives line:
html
<p>High Score: 120</p>The full scoreboard now looks like this:
html
<div class="scoreboard">
<p>Score: 0</p>
<p>Lives: 3</p>
<p>High Score: 120</p>
</div>2. Reload the page
The scoreboard now shows three lines instead of two. Confirm the visible change before you commit.
3. Stage, commit, push
bash
git add index.html
git commit -m "Added high score display"
git pushNotice git push has no arguments. Because Stage 8 used -u, Git already knows where to send this commit.
4. Refresh GitHub
Reload your repo page on github.com. The new commit appears:
- The commits count went from 4 to 5.
- The top commit in the list is Added high score display.
- Viewing
index.htmlon GitHub shows the new<p>High Score: 120</p>line.
Verify
- The local browser shows three scoreboard lines.
git log --onelineshows five commits.- GitHub shows five commits and the latest
index.htmlcontent.
The loop, one more time
You just did the everyday Git loop:
- Edit a file to make a visible change.
git addto stage the change.git commit -m "..."to create a save point.git pushto share it.
That is it. That is the job. Everything else (branches, merges, remotes) is support for this core rhythm.