What does git status tell you, and how do you read its output?
git status reports your current branch, how it compares with its upstream, and three groups of files: staged changes ready to commit, modified but unstaged changes, and untracked files Git does not know yet.
Explain it simply
git status is a dashboard glance before you commit. It answers 'where am I, and what is changed?'
The top line names the branch and says whether you are ahead of or behind the remote. Then come the groups. 'Changes to be committed' are staged. 'Changes not staged for commit' are edited tracked files. 'Untracked files' are new files never added. Git also prints the command to move a file between groups, such as git restore --staged to unstage.
Run it often. It costs nothing and prevents committing the wrong things.
Example
On branch feature/login
Your branch is ahead of 'origin/feature/login' by 1 commit.
Changes to be committed:
modified: auth.js
Changes not staged for commit:
modified: README.md
Untracked files:
notes.txtWhat to say in the interview
"git status shows the current branch, its position relative to the upstream, and files grouped as staged, modified but unstaged, and untracked. I use it before every commit to confirm exactly what will go in, and git status -s gives a compact version."