Think of Git as a big photo album.

Working Directory: This is like your messy desk where you make changes (edit files).

Staging Area: Here, you pick the photos you want to add to the album next (select changes to be committed).

Repository: This is your photo album where you save the selected photos permanently (commit).


[Working Directory] --> [Staging Area] --> [Repository]

(make changes) (select changes) (save changes)


So, you make changes in the working directory, move the ones you want to the staging area, and then commit them to the repository.
Untitled

Example:

We have a working directory named “demo” which contains a file demo.txt.

Using git status we can check the current state of your files in a Git project.

As we can see demo.txt is not staged. It is currently in working directory only.