Git status

The git status command displays the state of the working directory and the staging area. It shows you which changes have been staged, which have not, and which files are not being tracked by Git.



Tutorials dojo strip

Initial Example

To check the status of your working directory, use:

git status




STATUS Options

OptionDescription
-s, --shortDisplay the output in a short format.
-b, --branchShow branch and tracking information even in short format.
--show-stashDisplay the number of stashed entries.
--porcelain[=<version>]Provide output in a stable format suitable for scripts. Defaults to version v1.
--longDisplay the output in the long format (default).
-v, --verboseShow detailed changes staged for commit.
-u[<mode>], --untracked-files[=<mode>]Show untracked files. Modes: no, normal, all.
--ignore-submodules[=<when>]Ignore changes to submodules. Options: none, untracked, dirty, all (default).
--ignored[=<mode>]Show ignored files. Modes: traditional, no, matching.
-zTerminate entries with a NUL character instead of LF.
--column[=<options>], --no-columnDisplay untracked files in columns. Options: always, never.
--ahead-behind, --no-ahead-behindShow or hide detailed ahead/behind counts for the branch relative to its upstream branch.
--renames, --no-renamesTurn rename detection on or off, regardless of user configuration.
--find-renames[=<n>]Enable rename detection with an optional similarity threshold.
<pathspec>...Limit status output to paths matching the specified pathspec.




Examples

1. Checking the Status

Running the command will display information about changes to be committed, changes not staged for commit, and untracked files:

git status

2. Short Status

For a more concise output, you can use the -s or --short option:

git status -s

3. Branch Information

To include information about the branch you’re on, use the -b or --branch option:

git status -b

Scroll to Top