@@ -7,7 +7,7 @@ gitignore - Specifies intentionally untracked files to ignore
77
88SYNOPSIS
99--------
10- $XDG_CONFIG_HOME/git/ignore, $GIT_COMMON_DIR/info/exclude, .gitignore
10+ $XDG_CONFIG_HOME/git/ignore, $GIT_COMMON_DIR/info/exclude, .gitignore, .gitlocalignore
1111
1212DESCRIPTION
1313-----------
@@ -34,10 +34,17 @@ precedence, the last matching pattern decides the outcome):
3434 includes such `.gitignore` files in its repository, containing patterns for
3535 files generated as part of the project build.
3636
37- * Patterns read from `$GIT_COMMON_DIR/info/exclude`.
37+ * Patterns read from `$GIT_COMMON_DIR/info/exclude`.
3838
39- * Patterns read from the file specified by the configuration
40- variable `core.excludesFile`.
39+ * Patterns read from a `.gitlocalignore` file at the root of the
40+ working tree, but only when the `core.gitLocalIgnore` configuration
41+ variable is enabled (it is `false` by default). This file is intended
42+ for machine-local, uncommitted ignore rules: Git ignores the file
43+ itself (self-excluding) and never tracks it. Its precedence is below
44+ `$GIT_COMMON_DIR/info/exclude` but above `core.excludesFile`.
45+
46+ * Patterns read from the file specified by the configuration
47+ variable `core.excludesFile`.
4148
4249Which file to place a pattern in depends on how the pattern is meant to
4350be used.
@@ -57,7 +64,15 @@ be used.
5764 the user's editor of choice) generally go into a file specified by
5865 `core.excludesFile` in the user's `~/.gitconfig`. Its default value is
5966 $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or
60- empty, $HOME/.config/git/ignore is used instead.
67+ empty, $HOME/.config/git/ignore is used instead.
68+
69+ * Patterns which apply only to your local machine and which you do
70+ not want to share or commit (e.g., paths that exist only in your
71+ checkout) can go into a `.gitlocalignore` file at the root of the
72+ working tree, once `core.gitLocalIgnore` is enabled. Unlike the
73+ other files above, `.gitlocalignore` is ignored by Git itself and
74+ will never be tracked or pushed.
75+
6176
6277The underlying Git plumbing tools, such as
6378'git ls-files' and 'git read-tree', read
0 commit comments