Git & GitHub Interview Question #5

What is the working directory in Git?

Git Fundamentals, Repository, Working Tree, Staging, Commits & Branch Basics Junior Beginner

Quick Interview Answer

The working directory, also called the working tree, is the checked-out set of project files that you currently view and edit. Changes made here are not automatically included in the next commit.

Detailed Explanation

The working directory, also called the working tree, is the checked-out set of project files that you currently view and edit. Changes made here are not automatically included in the next commit.

Git compares the working tree with the index and the current commit so commands such as git status can report modified, untracked, staged, or deleted files.

Code Example

git status