Git

Package Managers gave BookNest its dependencies; this chapter gives it a memory. Git 1,932 records every version of every file, tells you who changed what and why, lets you try an idea on a branch and throw it away, and recovers work you thought you had destroyed. Everything later in this book starts from a Git repository: GitHub Actions 29 runs on a push (GitHub), Docker 514 builds from a checkout (Docker), Jenkins 8,793 polls a branch (Jenkins), Argo CD 126 syncs a cluster from a commit (Kubernetes), and CloudFormation 24 templates live beside the code they deploy (AWS CloudFormation).

The chapter uses Git 2.55.0 in Ubuntu 26.04 225 under WSL2 6 , and every line of output was produced by running the command shown. It is host-neutral: a Git repository is complete on your own disk, so nothing here needs a server; pull requests and other hosted features belong to GitHub. The Object Model opens the hood before you drive, and in First Repository you create BookNest's repository, whose history grows through the rest of the chapter.

What you will learn:

Sections