git status
See what changed in the folder and what is already staged
What it does
git status is the first thing to run when you are not sure what is going on in a repository. It shows the current branch, files changed since the last commit, files already staged for the next commit, and new files git does not know about yet.
It changes nothing, so run it as often as you like. With -s the output is short: one line per file with a two-letter status, such as M for modified and ?? for untracked.
Syntax
git status
git status -sExamples
See what has changed and what is staged
git statusstatus— state of the working tree and the index
Briefly show which files have changed
git status -ssame as:
git status --shortstatus— state of the working tree-s— short format: M, A, ??
Related commands
- git add — Stage changes so they go into the next commit
- git diff — See exactly what changed in your files, line by line
- git commit — Save the staged changes to history as a new commit