Skip to content
rajin

03The big picture of Git architecture

foundation25–30 minHandbook pp. 11–12 Not started

Warm-up · from “Your first repository and commit”

What does git init create?

No notes: write what you remember, then check. Recalling before reading is what makes it stick.

The problem

You want to explain why a branch switch is different from copying a folder. Start by separating data, references and checked-out files.

After this lesson you can

  • Identify the object database, refs and Index.

  • Distinguish porcelain from plumbing.

  • Locate Git metadata safely.

Key terms

Full glossary

Say what each term means, then open it to check.

  • Ref · new in this lesson

    Name identifying an object; branch refs usually identify commits.

  • Porcelain / plumbing · new in this lesson

    High-level workflow commands / lower-level inspection and operations.

  • Tree · preview, covered in lesson 6

    Directory snapshot mapping names, modes and object IDs.

  • Commit · preview, covered in lesson 7

    Object identifying a root tree, parent(s), metadata and message.

Visual mental model

  1. Working tree
  2. Index
  3. Objects
  4. HEAD
  5. Branch ref
  6. Commit

Build the mental model

Git has an object database containing immutable objects, refs that identify objects, an Index describing prepared content and a working tree for edits. HEAD identifies the current branch or a commit. Together these parts explain most everyday commands. The repository metadata is usually in .git, but linked worktrees may use a .git pointer file and bare repositories have no working tree.

Under the hood

High-level commands such as git commit are called porcelain. Lower-level commands such as git cat-file and git update-ref are plumbing. Porcelain gives convenient workflows; plumbing exposes specific mechanisms. The course uses both. Prefer supported commands for inspecting and changing metadata rather than editing files directly.

Common mistake · important nuance

HEAD is not the database, and the Index is not a second full physical copy of every file. The labels name different roles.

Move between parts freely. Completion counts only what you verify and answer.