Git Cheat Sheet · Changes
See the state of the working copy
git status
git status tells you where your working copy stands: the current branch, how far ahead or behind the remote it is, the files already staged for the next commit, those modified but not staged yet, and the files Git does not track.
What it does
Lists modified, added, deleted or untracked files, and those already staged for the next commit.
A use case
Before committing, you check that only the expected files have changed.
On the command line
git status- Detailed state, with hints about commands to run.
git status -s- Short version: two letters per file, the index on the left, the working copy on the right.
git status -sb- Short version with the branch and how far ahead or behind it is.
In Merathon
- The right panel always shows "Unstaged" and "Staged".
- The letter in front of each file gives its state: M modified, A added, D deleted, R renamed, ? untracked, ! conflicted.
- F5 forces a refresh.
Frequently asked questions
What do the letters in git status -s mean?
M modified, A added, D deleted, R renamed, ?? untracked, U in conflict. A letter on the left applies to the index, on the right to the working copy.
Why does a file not appear in git status?
Either it has not changed since the last commit, or it matches a pattern in .gitignore. git status --ignored also shows ignored files.