by Samy (Kondasamy Jayaraman)

Module 29 · Git

Beginner · by Samy (Kondasamy Jayaraman)

Crates named by what’s inside

Git keeps every version of your work as a sealed snapshot, named by its contents. A branch is just a label on one of them. Here you watch Larkspur’s price page change, split and come back together.

Read as

The whole idea in one example

One new price, one new name

The saved page

blob

7b2ed05

Drill press at 189.00.

One price changed

new blob

d072bc1

Every character of the name moves.

Each name is the first seven characters of the SHA-1 hash real Git computes for those exact bytes.

How it works

Four ideas carry the module

  1. 1 Named by its contents

    One new price, a whole new name

    Pro Git: Git names an object by the SHA-1 checksum of a header (its type, a space, its size in bytes and a null byte) followed by its content.

    Source, checked 25 October 2026

  2. 2 A chain of snapshots

    Each crate names its parent

    Pro Git: a commit names the top-level tree of its snapshot, its parent commits if any, the author and committer with a timestamp, then a blank line and the message.

    Source, checked 25 October 2026

  3. 3 A branch is a label

    A flag on a crate, nothing copied

    Pro Git: a branch in Git is simply a lightweight movable pointer to one of the commits.

    Source, checked 25 October 2026

  4. 4 Merges meet

    One line, two answers: a person picks

    Pro Git: if you changed the same part of the same file differently in the two branches, Git can’t merge them cleanly.

    Source, checked 25 October 2026

The story

Larkspur’s price page, in Git

Mira and Tom edit Larkspur Supply Co.’s price page in Git; the team finds that a commit is a snapshot named by its contents and a branch is just a label. You’re on the team that brings the work together.

3
commits on main when the story starts, each named by the hash real Git gives it
2
people editing one price page
3
branches waiting to come in on Friday, one of them shared
10
plans tie for best in chapter 7

Your path

The chapters

  1. Chapter 1

    Named by its contents

    How does Git name a version of a file?

  2. Chapter 2

    A chain of snapshots

    What is a commit, and why can’t its past change quietly?

  3. Chapter 3

    A branch is a label

    What does Git make when you make a branch?

  4. Chapter 4

    Three-way merge

    How does Git combine two branches that both changed the page?

  5. Chapter 5

    Both changed it

    What happens when both sides change the same line?

  6. Chapter 6

    Rewriting history

    What does a rebase do to commits, and when is it unsafe?

  7. Chapter 7

    Bring three branches in

    Which way and order brings all three in with no conflicts and the shortest history?

Who it’s for

  • Engineers
  • Product managers
  • Analysts
  • No code needed

Anyone who has clicked “merge” or been told about a branch, and wants to know what Git actually keeps. No commands to learn: they sit in fold-aways.