Menu
Coddy logo textTech

Recap - Time Machine

Part of the Version Control section of Coddy's Terminal journey — lesson 45 of 58.

challenge icon

Challenge

Medium

The folder contains page.html. Walk through this:

  1. Initialize the repo, configure user, and commit page.html with message Add page.
  2. Append the line oops to page.html and commit with message Add oops.
  3. Revert the latest commit (no editor) so the bad line is undone in a new commit.
  4. Print the total number of commits and the contents of page.html, in that order.

Use git rev-list --count HEAD for the count, then cat page.html.

Try it yourself

Terminal

All lessons in Version Control