Topic 1

Git status

Check what changed before you stage, commit, or push.

Check the current state

Open a new terminal with Ctrl + Shift + ` on Windows or Cmd + Shift + ` on macOS. Then enter the following command:

git status

Then you will see a result like this in the terminal:

Git status output in the terminal

Basic file states

The most important file states are:

State Meaning
tracked Git already knows about the file and watches it for changes.
modified The file has changed locally, but the change is not staged yet.
staged The change has been added to the next commit.
committed The change has been saved in the local Git history.
ignored Git intentionally leaves the file out because of an ignore rule.

If you can recognize the basic file states, you are ready to use git status more deliberately.