Skip to content

Working Directory

In one line

The working directory is the folder on your disk where you see and edit your project files — it is your live workspace.

In simple words

The working directory is the actual folder on your computer where your project files live. When you open your editor and see files, you are looking at the working directory. When you edit a file, you are modifying the working directory.

The working directory is one of Git's three areas. It holds the current state of your files as they exist on disk. Changes here are "unstaged" until you git add them to the staging area.

When you git checkout a different branch, Git updates the working directory to match that branch's files. When you git reset --hard, Git discards all working directory changes and restores files to match the last commit.

Example

bash
# Your files on disk are the working directory
ls
# app.js  config.txt  README.md

# Edit a file — it is now modified in the working directory
echo "new line" >> app.js
git status  # shows app.js as modified

Files on disk are your working directory. Edits show as modified until staged.

Related terms

Related Resources

Related Lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary