Skip to main content
Git FAQ
Frequently asked questions around Git and Version Control.
Git FAQ featured image

How to Use git status to Check Your Repository

git status shows the current state of your working copy — which files have changed, which are staged for the next commit, and whether your branch is in sync with its remote counterpart. It's one of the most frequently used Git commands and safe to run at any time.

The Git Cheat Sheet

No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!


Reading the Output

Run git status with no arguments:

$ git status
On branch feature/login
Your branch is ahead of 'origin/feature/login' by 1 commit.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
     deleted:   error.html
     new file:   img/icon.png

Unmerged paths:
  (use "git restore --staged <file>..." to unstage)
  (use "git add <file>..." to mark resolution)
      both modified:   index.html

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
      modified:   imprint.html

Untracked files:
  (use "git add <file>..." to include in what will be committed)
      products.html

Here's what each section means:

  • "On branch..." — the branch you currently have checked out.
  • "Your branch is..." — sync state with the remote: "ahead" means unpushed commits, "behind" means unpulled commits.
  • "Changes to be committed" — modifications already staged with git add, ready for the next commit.
  • "Unmerged paths" — files in a conflict state that need to be resolved before committing.
  • "Changes not staged for commit" — modified tracked files not yet staged.
  • "Untracked files" — new files Git is not yet tracking.

Compact Output

For a shorter format that still includes branch tracking info, use -s -b:

$ git status -s -b
## feature/login...origin/feature/login [ahead 1]
D  error.html
A  img/icon.png
 M imprint.html
UU index.html
?? products.html


Tip

Working Copy Status in Tower

In case you are using the Tower Git client, your working copy status is always right in front of you: select any modified file to see its changes in detail and simply stage it with a click!

About Us

As the makers of Tower, the best Git client for Mac and Windows, we help over 100,000 users in companies like Apple, Google, Amazon, Twitter, and Ebay get the most out of Git.

Just like with Tower, our mission with this platform is to help people become better professionals.

That's why we provide our guides, videos, and cheat sheets (about version control with Git and lots of other topics) for free.