Skip to main content
Back to command reference
Working with Changes

git status

Show the current state of the working tree and staging area

Practical example

bash
git status
# On branch main
# Changes not staged for commit:
#   modified:   src/index.ts
# Untracked files:
#   new-feature.ts

Command overview & how it works

Compares the working directory, staging area (index), and the most recent commit to show exactly what is tracked, modified, staged, or untracked. Files appear in three sections: 'Changes to be committed' (staged), 'Changes not staged for commit' (modified but not staged), and 'Untracked files' (new files Git does not know about). Use git status -s (short format) for a concise two-column output ideal for scripting. Use git status -b to always show branch information. Run this command frequently — it is the safest way to understand your repository state before committing, merging, or switching branches. Unlike git diff, it does not show the actual content changes, only the file names and their status.

Chapter 01 · Mental Model & Architecture

Get the complete offline Git Field Guide

The 97-page PDF + ePub course — ₹499. Read this command, offline.

Learn more

Practical tips

  • Run git status before every commit, merge, or branch switch to avoid surprises.
  • Use git status -s for a concise, scripting-friendly output with one line per file.
  • Use git status -sb to also show branch tracking and how many commits you are ahead of or behind the remote.

Deep-dive guides & tutorials

In-depth walkthroughs and practical scenarios related to git status

All guides →
  • Guide

    How to Install Git on Windows, macOS, and Linux

    A step-by-step setup guide covering every major platform, from Homebrew and Winget to package managers, plus verifying your install and configuring your identity.

    7 min readRead guide
  • Tutorial

    Git Basics Every Developer Should Know

    Understand the core concepts — repositories, commits, branches, and remotes — before diving into the command line.

    6 min readRead guide
  • Guide

    How to Write Better Git Commit Messages

    A practical guide to writing clear, conventional commit messages that make your project history readable and your team more productive.

    6 min readRead guide

Related commands

More from Working with Changes