Index

Module 11 · From ScratchGit

Git 04 and 05: Log and Checkout

IaC and GitOps
IaC and GitOps · Open board

The board where “rollback = git revert” and “audit = git log” are one-liners. This lesson builds the two commands those lines lean on: reading history back, and putting a folder back the way a commit had it.

Before you start. Git 03: Commits, Refs and HEAD made the commit: a top tree, a parent hash, an author and a message, with a branch file holding the newest one and HEAD naming the branch. Each commit points at its parent, so the history is a chain you can follow backwards. A root commit is the first one, the one with no parent line. This lesson covers two stages, because each is short: 04-log walks the chain, and 05-checkout rebuilds a folder from it.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review From Scratch →

Saved in this browser, and to your account when you sign in.