git-status
Show the status of the working directory
TLDR
Show changed files which are not yet added for commit
Give output in short format
Show verbose information on changes in both the staging area and working directory
Show the branch and tracking info
Show output in short format along with branch info
Show the number of entries currently stashed away
Don't show untracked files in the output
SYNOPSIS
git status [options…] [--] [pathspec…]
PARAMETERS
-s, --short
Display in compact single-line format.
-b, --branch
Show branch information, including upstream tracking.
--porcelain[=v2]
Machine-readable output; v2 is stable format for scripts.
--porcelain=v1
Legacy machine-readable format (deprecated).
-u[all|normal|no], --untracked-files[=all|normal|no]
Show untracked files: all (default), normal, or no.
--ignore-submodules[=none|untracked|dirty|all]
Ignore submodules unless specified (dirty is default).
--ignored
Display ignored files in untracked section.
--column[=width]
Display in columns (auto-width if unspecified).
--no-column
Disable columnar output.
--long
Long listing format for untracked files.
DESCRIPTION
The git status command displays the current state of the working directory and the staging area (index) in a Git repository. It provides a quick overview of changes, helping users track what files are modified, staged for commit, untracked, or ignored.
By default, output is human-readable and colorized: green for staged changes, red for unstaged modifications, and lists files under sections like 'Changes to be committed', 'Changes not staged for commit', and 'Untracked files'. It also shows the current branch and ahead/behind status relative to upstream.
This command is essential for daily Git workflows, indicating if the working tree is clean or 'dirty'. Options allow customization for scripting or concise views, such as machine-parsable porcelain format. Running git status frequently prevents accidental commits of unwanted changes.
CAVEATS
Output can be verbose in large repositories; use --short or --porcelain for scripts. Does not show diff details—use git diff. Paths after -- treat arguments literally.
EXIT STATUS
0 if working tree clean; 1 if dirty or unmerged; 128 for errors.
COLOR OUTPUT
Enabled by default via color.status config; customizable with color.status.<slot>.
PATHSPEC LIMITING
Specify paths to limit output to specific files/directories.
HISTORY
Introduced in Git 1.0.0 (2005) by Linus Torvalds as core porcelain command. Porcelain v2 added in Git 2.11 (2016) for stable scripting; evolved with submodule and rename detection support.


