Understanding the four states of files and how Git tracks modifications.
As you edit, add, or delete files in your local project workspace, Git classifies every file into one of four distinct states:
Git State Flow Diagram
Untracked File add → Staged (Ready) commit → Unmodified
Unmodified edit file → Modified add → Staged (Ready)
Checking Status
To inspect the status of your working directory relative to the current Git branch, use:
git status