<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">

<sect2 lang="en" id="git-status(1)">
    <title>git-status(1)</title>
    <date>2024-07-02</date>
<revhistory><revision><date>2024-07-02</date></revision></revhistory>
<indexterm>
<primary>git-status(1)</primary>
</indexterm>
<simplesect id="git-status(1)__name">
<title>NAME</title>
<simpara>git-status - Show the working tree status</simpara>
</simplesect>
<simplesect id="git-status(1)__synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git status</emphasis> [&lt;options&gt;] [--] [&lt;pathspec&gt;&#8230;]</literallayout>
</blockquote>
</simplesect>
<simplesect id="git-status(1)__description">
<title>DESCRIPTION</title>
<simpara>Displays paths that have differences between the index file and the
current HEAD commit, paths that have differences between the working
tree and the index file, and paths in the working tree that are not
tracked by Git (and are not ignored by <xref linkend="gitignore(5)" />). The first
are what you <emphasis>would</emphasis> commit by running <emphasis>git commit</emphasis>; the second and
third are what you <emphasis>could</emphasis> commit by running <emphasis>git add</emphasis> before running
<emphasis>git commit</emphasis>.</simpara>
</simplesect>
<simplesect id="git-status(1)__options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-s
</term>
<term>
--short
</term>
<listitem>
<simpara>
        Give the output in the short-format.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-b
</term>
<term>
--branch
</term>
<listitem>
<simpara>
        Show the branch and tracking info even in short-format.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--show-stash
</term>
<listitem>
<simpara>
        Show the number of entries currently stashed away.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--porcelain[=&lt;version&gt;]
</term>
<listitem>
<simpara>
        Give the output in an easy-to-parse format for scripts.
        This is similar to the short output, but will remain stable
        across Git versions and regardless of user configuration. See
        below for details.
</simpara>
<simpara>The version parameter is used to specify the format version.
This is optional and defaults to the original version <emphasis>v1</emphasis> format.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--long
</term>
<listitem>
<simpara>
        Give the output in the long-format. This is the default.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-v
</term>
<term>
--verbose
</term>
<listitem>
<simpara>
        In addition to the names of files that have been changed, also
        show the textual changes that are staged to be committed
        (i.e., like the output of <emphasis>git diff --cached</emphasis>). If <emphasis>-v</emphasis> is specified
        twice, then also show the changes in the working tree that
        have not yet been staged (i.e., like the output of <emphasis>git diff</emphasis>).
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-u[&lt;mode&gt;]
</term>
<term>
--untracked-files[=&lt;mode&gt;]
</term>
<listitem>
<simpara>
        Show untracked files.
</simpara>
<simpara>The mode parameter is used to specify the handling of untracked files.
It is optional: it defaults to <emphasis>all</emphasis>, and if specified, it must be
stuck to the option (e.g. <emphasis>-uno</emphasis>, but not <emphasis>-u no</emphasis>).</simpara>
<simpara>The possible options are:</simpara>
<itemizedlist>
<listitem>
<simpara>
<emphasis>no</emphasis>     - Show no untracked files.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>normal</emphasis> - Shows untracked files and directories.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>all</emphasis>    - Also shows individual files in untracked directories.
</simpara>
</listitem>
</itemizedlist>
<simpara>When <emphasis>-u</emphasis> option is not used, untracked files and directories are
shown (i.e. the same as specifying <emphasis>normal</emphasis>), to help you avoid
forgetting to add newly created files.  Because it takes extra work
to find untracked files in the filesystem, this mode may take some
time in a large working tree.
Consider enabling untracked cache and split index if supported (see
<emphasis>git update-index --untracked-cache</emphasis> and <emphasis>git update-index
--split-index</emphasis>), Otherwise you can use <emphasis>no</emphasis> to have <emphasis>git status</emphasis>
return more quickly without showing untracked files.
All usual spellings for Boolean value <emphasis>true</emphasis> are taken as <emphasis>normal</emphasis>
and <emphasis>false</emphasis> as <emphasis>no</emphasis>.</simpara>
<simpara>The default can be changed using the status.showUntrackedFiles
configuration variable documented in <xref linkend="git-config(1)" />.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--ignore-submodules[=&lt;when&gt;]
</term>
<listitem>
<simpara>
        Ignore changes to submodules when looking for changes. &lt;when&gt; can be
        either "none", "untracked", "dirty" or "all", which is the default.
        Using "none" will consider the submodule modified when it either contains
        untracked or modified files or its HEAD differs from the commit recorded
        in the superproject and can be used to override any settings of the
        <emphasis>ignore</emphasis> option in <xref linkend="git-config(1)" /> or <xref linkend="gitmodules(5)" />. When
        "untracked" is used submodules are not considered dirty when they only
        contain untracked content (but they are still scanned for modified
        content). Using "dirty" ignores all changes to the work tree of submodules,
        only changes to the commits stored in the superproject are shown (this was
        the behavior before 1.7.0). Using "all" hides all changes to submodules
        (and suppresses the output of submodule summaries when the config option
        <emphasis>status.submoduleSummary</emphasis> is set).
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--ignored[=&lt;mode&gt;]
</term>
<listitem>
<simpara>
        Show ignored files as well.
</simpara>
<simpara>The mode parameter is used to specify the handling of ignored files.
It is optional: it defaults to <emphasis>traditional</emphasis>.</simpara>
<simpara>The possible options are:</simpara>
<itemizedlist>
<listitem>
<simpara>
<emphasis>traditional</emphasis> - Shows ignored files and directories, unless
                          --untracked-files=all is specified, in which case
                          individual files in ignored directories are
                          displayed.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>no</emphasis>          - Show no ignored files.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>matching</emphasis>    - Shows ignored files and directories matching an
                          ignore pattern.
</simpara>
</listitem>
</itemizedlist>
<simpara>When <emphasis>matching</emphasis> mode is specified, paths that explicitly match an
ignored pattern are shown. If a directory matches an ignore pattern,
then it is shown, but not paths contained in the ignored directory. If
a directory does not match an ignore pattern, but all contents are
ignored, then the directory is not shown, but all contents are shown.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-z
</term>
<listitem>
<simpara>
        Terminate entries with NUL, instead of LF.  This implies
        the <emphasis>--porcelain=v1</emphasis> output format if no other format is given.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--column[=&lt;options&gt;]
</term>
<term>
--no-column
</term>
<listitem>
<simpara>
        Display untracked files in columns. See configuration variable
        <emphasis>column.status</emphasis> for option syntax. <emphasis>--column</emphasis> and <emphasis>--no-column</emphasis>
        without options are equivalent to <emphasis>always</emphasis> and <emphasis>never</emphasis>
        respectively.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--ahead-behind
</term>
<term>
--no-ahead-behind
</term>
<listitem>
<simpara>
        Display or do not display detailed ahead/behind counts for the
        branch relative to its upstream branch.  Defaults to true.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--renames
</term>
<term>
--no-renames
</term>
<listitem>
<simpara>
        Turn on/off rename detection regardless of user configuration.
        See also <xref linkend="git-diff(1)" /> <emphasis>--no-renames</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--find-renames[=&lt;n&gt;]
</term>
<listitem>
<simpara>
        Turn on rename detection, optionally setting the similarity
        threshold.
        See also <xref linkend="git-diff(1)" /> <emphasis>--find-renames</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
&lt;pathspec&gt;&#8230;
</term>
<listitem>
<simpara>
        See the <emphasis>pathspec</emphasis> entry in <xref linkend="gitglossary(7)" />.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-status(1)__output">
<title>OUTPUT</title>
<simpara>The output from this command is designed to be used as a commit
template comment.
The default, long format, is designed to be human readable,
verbose and descriptive.  Its contents and format are subject to change
at any time.</simpara>
<simpara>The paths mentioned in the output, unlike many other Git commands, are
made relative to the current directory if you are working in a
subdirectory (this is on purpose, to help cutting and pasting). See
the status.relativePaths config option below.</simpara>
<section id="git-status(1)__short_format">
<title>Short Format</title>
<simpara>In the short-format, the status of each path is shown as one of these
forms</simpara>
<literallayout class="monospaced">XY PATH
XY ORIG_PATH -&gt; PATH</literallayout>
<simpara>where <emphasis>ORIG_PATH</emphasis> is where the renamed/copied contents came
from. <emphasis>ORIG_PATH</emphasis> is only shown when the entry is renamed or
copied. The <emphasis>XY</emphasis> is a two-letter status code.</simpara>
<simpara>The fields (including the <emphasis>-&gt;</emphasis>) are separated from each other by a
single space. If a filename contains whitespace or other nonprintable
characters, that field will be quoted in the manner of a C string
literal: surrounded by ASCII double quote (34) characters, and with
interior special characters backslash-escaped.</simpara>
<simpara>There are three different types of states that are shown using this format, and
each one uses the <emphasis>XY</emphasis> syntax differently:</simpara>
<itemizedlist>
<listitem>
<simpara>
When a merge is occurring and the merge was successful, or outside of a merge
        situation, <emphasis>X</emphasis> shows the status of the index and <emphasis>Y</emphasis> shows the status of the
        working tree.
</simpara>
</listitem>
<listitem>
<simpara>
When a merge conflict has occurred and has not yet been resolved, <emphasis>X</emphasis> and <emphasis>Y</emphasis>
        show the state introduced by each head of the merge, relative to the common
        ancestor. These paths are said to be <emphasis>unmerged</emphasis>.
</simpara>
</listitem>
<listitem>
<simpara>
When a path is untracked, <emphasis>X</emphasis> and <emphasis>Y</emphasis> are always the same, since they are
        unknown to the index. <emphasis>??</emphasis> is used for untracked paths. Ignored files are
        not listed unless <emphasis>--ignored</emphasis> is used; if it is, ignored files are indicated
        by <emphasis>!!</emphasis>.
</simpara>
</listitem>
</itemizedlist>
<simpara>Note that the term <emphasis>merge</emphasis> here also includes rebases using the default
<emphasis>--merge</emphasis> strategy, cherry-picks, and anything else using the merge machinery.</simpara>
<simpara>In the following table, these three classes are shown in separate sections, and
these characters are used for <emphasis>X</emphasis> and <emphasis>Y</emphasis> fields for the first two sections that
show tracked paths:</simpara>
<itemizedlist>
<listitem>
<simpara>
' ' = unmodified
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>M</emphasis> = modified
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>T</emphasis> = file type changed (regular file, symbolic link or submodule)
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>A</emphasis> = added
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>D</emphasis> = deleted
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>R</emphasis> = renamed
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>C</emphasis> = copied (if config option status.renames is set to "copies")
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>U</emphasis> = updated but unmerged
</simpara>
</listitem>
</itemizedlist>
<literallayout class="monospaced">X          Y     Meaning
-------------------------------------------------
         [AMD]   not updated
M        [ MTD]  updated in index
T        [ MTD]  type changed in index
A        [ MTD]  added to index
D                deleted from index
R        [ MTD]  renamed in index
C        [ MTD]  copied in index
[MTARC]          index and work tree matches
[ MTARC]    M    work tree changed since index
[ MTARC]    T    type changed in work tree since index
[ MTARC]    D    deleted in work tree
            R    renamed in work tree
            C    copied in work tree
-------------------------------------------------
D           D    unmerged, both deleted
A           U    unmerged, added by us
U           D    unmerged, deleted by them
U           A    unmerged, added by them
D           U    unmerged, deleted by us
A           A    unmerged, both added
U           U    unmerged, both modified
-------------------------------------------------
?           ?    untracked
!           !    ignored
-------------------------------------------------</literallayout>
<simpara>Submodules have more state and instead report</simpara>
<itemizedlist>
<listitem>
<simpara>
<emphasis>M</emphasis> = the submodule has a different HEAD than recorded in the index
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>m</emphasis> = the submodule has modified content
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>?</emphasis> = the submodule has untracked files
</simpara>
</listitem>
</itemizedlist>
<simpara>This is since modified content or untracked files in a submodule cannot be added
via <emphasis>git add</emphasis> in the superproject to prepare a commit.</simpara>
<simpara><emphasis>m</emphasis> and <emphasis>?</emphasis> are applied recursively. For example if a nested submodule
in a submodule contains an untracked file, this is reported as <emphasis>?</emphasis> as well.</simpara>
<simpara>If -b is used the short-format status is preceded by a line</simpara>
<literallayout class="monospaced">## branchname tracking info</literallayout>
</section>
<section id="git-status(1)__porcelain_format_version_1">
<title>Porcelain Format Version 1</title>
<simpara>Version 1 porcelain format is similar to the short format, but is guaranteed
not to change in a backwards-incompatible way between Git versions or
based on user configuration. This makes it ideal for parsing by scripts.
The description of the short format above also describes the porcelain
format, with a few exceptions:</simpara>
<orderedlist numeration="arabic">
<listitem>
<simpara>
The user's color.status configuration is not respected; color will
   always be off.
</simpara>
</listitem>
<listitem>
<simpara>
The user's status.relativePaths configuration is not respected; paths
   shown will always be relative to the repository root.
</simpara>
</listitem>
</orderedlist>
<simpara>There is also an alternate -z format recommended for machine parsing. In
that format, the status field is the same, but some other things
change.  First, the <emphasis>-&gt;</emphasis> is omitted from rename entries and the field
order is reversed (e.g <emphasis>from -&gt; to</emphasis> becomes <emphasis>to from</emphasis>). Second, a NUL
(ASCII 0) follows each filename, replacing space as a field separator
and the terminating newline (but a space still separates the status
field from the first filename).  Third, filenames containing special
characters are not specially formatted; no quoting or
backslash-escaping is performed.</simpara>
<simpara>Any submodule changes are reported as modified <emphasis>M</emphasis> instead of <emphasis>m</emphasis> or single <emphasis>?</emphasis>.</simpara>
</section>
<section id="git-status(1)__porcelain_format_version_2">
<title>Porcelain Format Version 2</title>
<simpara>Version 2 format adds more detailed information about the state of
the worktree and changed items.  Version 2 also defines an extensible
set of easy to parse optional headers.</simpara>
<simpara>Header lines start with "#" and are added in response to specific
command line arguments.  Parsers should ignore headers they
don't recognize.</simpara>
<section id="git-status(1)__branch_headers">
<title>Branch Headers</title>
<simpara>If <emphasis>--branch</emphasis> is given, a series of header lines are printed with
information about the current branch.</simpara>
<literallayout class="monospaced">Line                                     Notes
------------------------------------------------------------
# branch.oid &lt;commit&gt; | (initial)        Current commit.
# branch.head &lt;branch&gt; | (detached)      Current branch.
# branch.upstream &lt;upstream-branch&gt;      If upstream is set.
# branch.ab +&lt;ahead&gt; -&lt;behind&gt;           If upstream is set and
                                         the commit is present.
------------------------------------------------------------</literallayout>
</section>
<section id="git-status(1)__stash_information">
<title>Stash Information</title>
<simpara>If <emphasis>--show-stash</emphasis> is given, one line is printed showing the number of stash
entries if non-zero:</simpara>
<literallayout class="monospaced"># stash &lt;N&gt;</literallayout>
</section>
<section id="git-status(1)__changed_tracked_entries">
<title>Changed Tracked Entries</title>
<simpara>Following the headers, a series of lines are printed for tracked
entries.  One of three different line formats may be used to describe
an entry depending on the type of change.  Tracked entries are printed
in an undefined order; parsers should allow for a mixture of the 3
line types in any order.</simpara>
<simpara>Ordinary changed entries have the following format:</simpara>
<literallayout class="monospaced">1 &lt;XY&gt; &lt;sub&gt; &lt;mH&gt; &lt;mI&gt; &lt;mW&gt; &lt;hH&gt; &lt;hI&gt; &lt;path&gt;</literallayout>
<simpara>Renamed or copied entries have the following format:</simpara>
<literallayout class="monospaced">2 &lt;XY&gt; &lt;sub&gt; &lt;mH&gt; &lt;mI&gt; &lt;mW&gt; &lt;hH&gt; &lt;hI&gt; &lt;X&gt;&lt;score&gt; &lt;path&gt;&lt;sep&gt;&lt;origPath&gt;</literallayout>
<literallayout class="monospaced">Field       Meaning
--------------------------------------------------------
&lt;XY&gt;        A 2 character field containing the staged and
            unstaged XY values described in the short format,
            with unchanged indicated by a "." rather than
            a space.
&lt;sub&gt;       A 4 character field describing the submodule state.
            "N..." when the entry is not a submodule.
            "S&lt;c&gt;&lt;m&gt;&lt;u&gt;" when the entry is a submodule.
            &lt;c&gt; is "C" if the commit changed; otherwise ".".
            &lt;m&gt; is "M" if it has tracked changes; otherwise ".".
            &lt;u&gt; is "U" if there are untracked changes; otherwise ".".
&lt;mH&gt;        The octal file mode in HEAD.
&lt;mI&gt;        The octal file mode in the index.
&lt;mW&gt;        The octal file mode in the worktree.
&lt;hH&gt;        The object name in HEAD.
&lt;hI&gt;        The object name in the index.
&lt;X&gt;&lt;score&gt;  The rename or copy score (denoting the percentage
            of similarity between the source and target of the
            move or copy). For example "R100" or "C75".
&lt;path&gt;      The pathname.  In a renamed/copied entry, this
            is the target path.
&lt;sep&gt;       When the `-z` option is used, the 2 pathnames are separated
            with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
            byte separates them.
&lt;origPath&gt;  The pathname in the commit at HEAD or in the index.
            This is only present in a renamed/copied entry, and
            tells where the renamed/copied contents came from.
--------------------------------------------------------</literallayout>
<simpara>Unmerged entries have the following format; the first character is
a "u" to distinguish from ordinary changed entries.</simpara>
<literallayout class="monospaced">u &lt;XY&gt; &lt;sub&gt; &lt;m1&gt; &lt;m2&gt; &lt;m3&gt; &lt;mW&gt; &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;path&gt;</literallayout>
<literallayout class="monospaced">Field       Meaning
--------------------------------------------------------
&lt;XY&gt;        A 2 character field describing the conflict type
            as described in the short format.
&lt;sub&gt;       A 4 character field describing the submodule state
            as described above.
&lt;m1&gt;        The octal file mode in stage 1.
&lt;m2&gt;        The octal file mode in stage 2.
&lt;m3&gt;        The octal file mode in stage 3.
&lt;mW&gt;        The octal file mode in the worktree.
&lt;h1&gt;        The object name in stage 1.
&lt;h2&gt;        The object name in stage 2.
&lt;h3&gt;        The object name in stage 3.
&lt;path&gt;      The pathname.
--------------------------------------------------------</literallayout>
</section>
<section id="git-status(1)__other_items">
<title>Other Items</title>
<simpara>Following the tracked entries (and if requested), a series of
lines will be printed for untracked and then ignored items
found in the worktree.</simpara>
<simpara>Untracked items have the following format:</simpara>
<literallayout class="monospaced">? &lt;path&gt;</literallayout>
<simpara>Ignored items have the following format:</simpara>
<literallayout class="monospaced">! &lt;path&gt;</literallayout>
</section>
<section id="git-status(1)__pathname_format_notes_and_z">
<title>Pathname Format Notes and -z</title>
<simpara>When the <emphasis>-z</emphasis> option is given, pathnames are printed as is and
without any quoting and lines are terminated with a NUL (ASCII 0x00)
byte.</simpara>
<simpara>Without the <emphasis>-z</emphasis> option, pathnames with "unusual" characters are
quoted as explained for the configuration variable <emphasis>core.quotePath</emphasis>
(see <xref linkend="git-config(1)" />).</simpara>
</section>
</section>
</simplesect>
<simplesect id="git-status(1)__configuration">
<title>CONFIGURATION</title>
<simpara>The command honors <emphasis>color.status</emphasis> (or <emphasis>status.color</emphasis> -- they
mean the same thing and the latter is kept for backward
compatibility) and <emphasis>color.status.&lt;slot&gt;</emphasis> configuration variables
to colorize its output.</simpara>
<simpara>If the config variable <emphasis>status.relativePaths</emphasis> is set to false, then all
paths shown are relative to the repository root, not to the current
directory.</simpara>
<simpara>If <emphasis>status.submoduleSummary</emphasis> is set to a non zero number or true (identical
to -1 or an unlimited number), the submodule summary will be enabled for
the long format and a summary of commits for modified submodules will be
shown (see --summary-limit option of <xref linkend="git-submodule(1)" />). Please note
that the summary output from the status command will be suppressed for all
submodules when <emphasis>diff.ignoreSubmodules</emphasis> is set to <emphasis>all</emphasis> or only for those
submodules where <emphasis>submodule.&lt;name&gt;.ignore=all</emphasis>. To also view the summary for
ignored submodules you can either use the --ignore-submodules=dirty command
line option or the <emphasis>git submodule summary</emphasis> command, which shows a similar
output but does not honor these settings.</simpara>
</simplesect>
<simplesect id="git-status(1)__background_refresh">
<title>BACKGROUND REFRESH</title>
<simpara>By default, <emphasis>git status</emphasis> will automatically refresh the index, updating
the cached stat information from the working tree and writing out the
result. Writing out the updated index is an optimization that isn't
strictly necessary (<emphasis>status</emphasis> computes the values for itself, but writing
them out is just to save subsequent programs from repeating our
computation). When <emphasis>status</emphasis> is run in the background, the lock held
during the write may conflict with other simultaneous processes, causing
them to fail. Scripts running <emphasis>status</emphasis> in the background should consider
using <emphasis>git --no-optional-locks status</emphasis> (see <xref linkend="git(1)" /> for details).</simpara>
</simplesect>
<simplesect id="git-status(1)__untracked_files_and_performance">
<title>UNTRACKED FILES AND PERFORMANCE</title>
<simpara><emphasis>git status</emphasis> can be very slow in large worktrees if/when it
needs to search for untracked files and directories. There are
many configuration options available to speed this up by either
avoiding the work or making use of cached results from previous
Git commands. There is no single optimum set of settings right
for everyone. We'll list a summary of the relevant options to help
you, but before going into the list, you may want to run <emphasis>git status</emphasis>
again, because your configuration may already be caching <emphasis>git status</emphasis>
results, so it could be faster on subsequent runs.</simpara>
<itemizedlist>
<listitem>
<simpara>
The <emphasis>--untracked-files=no</emphasis> flag or the
        <emphasis>status.showUntrackedFiles=no</emphasis> config (see above for both):
        indicate that <emphasis>git status</emphasis> should not report untracked
        files. This is the fastest option. <emphasis>git status</emphasis> will not list
        the untracked files, so you need to be careful to remember if
        you create any new files and manually <emphasis>git add</emphasis> them.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>advice.statusUoption=false</emphasis> (see <xref linkend="git-config(1)" />):
        setting this variable to <emphasis>false</emphasis> disables the warning message
        given when enumerating untracked files takes more than 2
        seconds.  In a large project, it may take longer and the user
        may have already accepted the trade off (e.g. using "-uno" may
        not be an acceptable option for the user), in which case, there
        is no point issuing the warning message, and in such a case,
        disabling the warning may be the best.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>core.untrackedCache=true</emphasis> (see <xref linkend="git-update-index(1)" />):
        enable the untracked cache feature and only search directories
        that have been modified since the previous <emphasis>git status</emphasis> command.
        Git remembers the set of untracked files within each directory
        and assumes that if a directory has not been modified, then
        the set of untracked files within has not changed.  This is much
        faster than enumerating the contents of every directory, but still
        not without cost, because Git still has to search for the set of
        modified directories. The untracked cache is stored in the
        <emphasis>.git/index</emphasis> file. The reduced cost of searching for untracked
        files is offset slightly by the increased size of the index and
        the cost of keeping it up-to-date. That reduced search time is
        usually worth the additional size.
</simpara>
</listitem>
<listitem>
<simpara>
<emphasis>core.untrackedCache=true</emphasis> and <emphasis>core.fsmonitor=true</emphasis> or
        <emphasis>core.fsmonitor=&lt;hook-command-pathname&gt;</emphasis> (see
        <xref linkend="git-update-index(1)" />): enable both the untracked cache
        and FSMonitor features and only search directories that have
        been modified since the previous <emphasis>git status</emphasis> command.  This
        is faster than using just the untracked cache alone because
        Git can also avoid searching for modified directories.  Git
        only has to enumerate the exact set of directories that have
        changed recently. While the FSMonitor feature can be enabled
        without the untracked cache, the benefits are greatly reduced
        in that case.
</simpara>
</listitem>
</itemizedlist>
<simpara>Note that after you turn on the untracked cache and/or FSMonitor
features it may take a few <emphasis>git status</emphasis> commands for the various
caches to warm up before you see improved command times.  This is
normal.</simpara>
</simplesect>
<simplesect id="git-status(1)__see_also">
<title>SEE ALSO</title>
<simpara><xref linkend="gitignore(5)" /></simpara>
</simplesect>
<simplesect id="git-status(1)__git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
</simplesect>
</sect2>
