Skip to content
>devspeak
← glossary
level 3Git & Version Control

Working tree

also: working directory, working copy, uncommitted changes

The files in your project folder as they are right now, including any changes Git hasn't saved yet.

a bit more technical

The checked-out files you edit directly, as opposed to the history Git has stored. Edits in the working tree stay uncommitted until you stage and commit them. A clean working tree has no changes since the last commit; a dirty one does.

picture it

Your desk while you're writing, versus the filing cabinet of finished versions. The desk has your latest scribbles. The cabinet has what you officially filed.

why it matters

Agents edit the working tree directly. Checking that it's clean before a task means you'll know which changes are the agent's and which were already there.

what your agent might say
agent
Your working tree has uncommitted changes in checkout.ts and styles.css. Should I commit them first, stash them, or leave them alone and work around them?
how you might use it
you → your agent
Check that the working tree is clean before you start. If it isn't, show me what's changed and don't touch those files.
common mistake

Thinking edits are protected by Git as soon as you save the file. Saving writes to disk. Git doesn't keep a copy of those changes until you commit them.

builds on