What is the Working Tree

The working tree (also called working directory) is the actual directory of files on your filesystem — the files you edit with your editor, compile, and run. It is not inside .git/; it is the project root and everything in it.

How it works

Git's three data areas are:

  1. Object database (.git/objects/) — the immutable store of all blobs, trees, and commits.
  2. Index (.git/index) — the staging area, tracking what will go into the next commit.
  3. Working tree — the files you see and edit.

git checkout populates the working tree from a commit's tree. git add copies changes from the working tree into the index. git commit creates a snapshot from the index.

git status compares the working tree against the index to show unstaged changes. Files in the working tree that are not in the index and not in .gitignore are shown as untracked.

Why it matters

The working tree is where you do your actual work. Understanding that it is separate from the index and the object database clarifies why git add exists — it is the step that moves changes from your editable files into Git's staging area.

See How Git Internals Work for the three-way comparison that powers git status.