working tree
The files of a Git repository as they currently exist on disk, which you edit before staging and committing.
In more detail
It is one of Git's three areas, alongside the staging area and the repository. Git compares it with the staging area to report changes not staged for commit, and commands such as git restore change it. A bare repository has no working tree at all.
Example
In this course: A clean checkout is a fresh copy with no local changes or leftovers. Running the gate from one proves nothing hidden on your machine is needed, and a clean working tree after a test run proves the tests own their state.Related terms
- commit history — The full chain of commits in a repository, which keeps every past version of every file, including deleted secrets.
- Git — A free, open-source distributed version control system that records the history of a project as a chain of snapshots.
- staging area — Git's list of exactly what the next commit will contain, kept in the file .git/index; also called the index.
- repository — A project folder whose full history is tracked by version control; in Git, your files plus the hidden .git directory that stores every commit.
- git status — The Git command that reports what is staged, what is changed but not staged, and what is untracked.
- git restore — The command that throws away uncommitted changes to a file, or with --staged takes a file back out of the staging area.
- secret scanning — Searching code, commits and files for credentials such as keys and tokens, ideally before they are committed.
- test isolation — The property that each test sets up everything it needs and leaves nothing behind, so tests pass in any order.
Taught in
- Pre-Commit Secret Scanning with Gitleaks & Entropy — Cloud Security & DevSecOps Engineering
- A Repository Is A Folder With A Memory — Advanced Git Internals & Distributed Workflows
- The Three Areas: Working Tree, Index, Repository — Advanced Git Internals & Distributed Workflows
- Staging Deliberately: status, add, add --patch — Advanced Git Internals & Distributed Workflows
- Reading History: log, show And diff — Advanced Git Internals & Distributed Workflows
- HEAD, And Why Detached HEAD Is Not An Error — Advanced Git Internals & Distributed Workflows
- Undoing: restore, reset, revert And stash — Advanced Git Internals & Distributed Workflows
- What A Remote Actually Is — Advanced Git Internals & Distributed Workflows
- Clone, Forks, Push, And The Upstream Branch — Advanced Git Internals & Distributed Workflows
- Fetch Is Not Pull — Advanced Git Internals & Distributed Workflows
- Cherry Picking, Reflog, And Getting Work Back — Advanced Git Internals & Distributed Workflows
- Investigating History: blame, bisect And worktree — Advanced Git Internals & Distributed Workflows
- Why Secrets Leak — Application Security & Threat Modeling for Engineers
- Secret Scanning — Application Security & Threat Modeling for Engineers
- Testing The Filesystem — Automated Testing, TDD & Quality Engineering
- Integration Testing With Containers — Automated Testing, TDD & Quality Engineering
- Code Review As A Quality Gate — Automated Testing, TDD & Quality Engineering