Recap - Time Machine
Part of the Version Control section of Coddy's Terminal journey — lesson 45 of 58.
Challenge
MediumThe folder contains page.html. Walk through this:
- Initialize the repo, configure user, and commit
page.htmlwith messageAdd page. - Append the line
oopstopage.htmland commit with messageAdd oops. - Revert the latest commit (no editor) so the bad line is undone in a new commit.
- 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
2Getting Started
Initialize A RepositoryThe .git FolderConfigure Your IdentityGit StatusRecap - First Repo8Merging
What Is A MergeFast-Forward MergeThree-Way MergeMerge ConflictsResolve A ConflictRecap - Merge Master11Feature Branch Project
Project OverviewInitialize Main3Tracking Changes
The Staging AreaGit AddGit CommitModifying A Tracked FileGit LogRecap - First Commits6Recipe Site Project
Project OverviewInitialize And Ignore9Undoing Changes
Discard Unstaged ChangesUnstage A FileAmend The Last CommitRevert A CommitReset A BranchRecap - Time Machine