TracksPractical Coding FoundationsVersion ControlChecking Status(3 of 12)

Checking Status

The git status command is your window into what's happening in your repository. It shows which files have changed, which are ready to be committed, and which Git isn't tracking at all. Running this command frequently keeps you oriented and prevents surprises.

Your Most-Used Command

Get in the habit of running git status often — before staging files, before committing, and whenever you're unsure what state your project is in:

Git tells you exactly what's going on and often suggests what to do next.

Understanding File States

Files in a Git repository exist in one of several states:

Untracked means Git sees the file but isn't monitoring it. New files start here. Git won't include them in commits until you explicitly add them.

Modified means Git is tracking the file and you've made changes since the last commit. These changes aren't staged yet.

Staged means the file's changes are queued up for the next commit. You've told Git "include this in my next snapshot."

Unmodified means the file matches what's in the last commit. Git doesn't mention these files in status output — no news is good news.

Reading the Output

After you've made some changes and staged some files, status output becomes more detailed:

This tells you:

  • hello.py is staged and will be included in the next commit
  • readme.md has changes that aren't staged yet
  • notes.txt is a new file Git isn't tracking

A Shorter View

For a more compact status, use the -s flag:

The letters indicate state: A for added/staged, M for modified, ?? for untracked.

See More

Further Reading

You need to be signed in to leave a comment and join the discussion