Skip to content
BENIBIX Learn

Git Status

Development🔀 Version ControlGit Basics

Also known as git status, Git Status Command

A command that shows which files changed, which are staged and which are new.

Think of it like

Think of it like looking at your desk before you leave. You see what is done, what is half done and what is new.

Example

Before each commit, Lucy runs git status. She spots a notes file she did not mean to add.

Why it matters

It stops surprises. You see exactly what your next commit will hold.

Definition

Git status shows the state of your files right now. It lists files you changed but did not stage. It lists files that are staged and ready to commit. It also lists new files Git is not tracking yet. It changes nothing, so you can run it as often as you like.

Example code

console
$ git status --short
M  index.html
 M style.css
?? notes.txt
index.html is staged, style.css changed but is not staged, and notes.txt is new.
Git status reads out where each file sits right now.

Common mistake

Committing without looking first. Secret files and junk slip in this way.

Key takeaways

  1. 1
    Read only. It never changes anything.
  2. 2
    Three lists. Staged, not staged and untracked.
  3. 3
    Run it often. Check before each commit.

Learn it properly