Many VCS’s use a two-tier architecture i.e a repository and a working copy. Git uses three-tier architecture i.e a working directory, staging area and local repository. The three stages of git can store different(or the same) states of the same code in each stage.
As we can see in above diagram there are three stages in git. When we give any file to the git that file goes from each stage at least once. The three stages of git can store different(or the same) states of the same code in each stage.
In above diagram there are three stages those are Working directory,Staging area and Git directory(Repository).
Working directory specifies the file explorer’s folder where your files are stored, Staging area is a area where your those files are present which you want to send to commit(to create snapshot of files), After commit is fired, files which are in staging area will move to Git Repository.
Now if you made any changes in the files which are in Git repository, those files(with changes) will be in Unstaging area. You again have to add them into Staging area and Commit.