Report the index format version used by the on-disk index file.
See `--index-version` above.
-z::
Only meaningful with `--stdin` or `--index-info`; paths are
separated with NUL character instead of LF.
--split-index::
--no-split-index::
Enable or disable split index mode. If split-index mode is
already enabled and `--split-index` is given again, all
changes in $GIT_DIR/index are pushed back to the shared index
file.
+
These options take effect whatever the value of the `core.splitIndex`
configuration variable (see linkgit:git-config[1]). But a warning is
emitted when the change goes against the configured value, as the
configured value will take effect next time the index is read and this
will remove the intended effect of the option.
--untracked-cache::
--no-untracked-cache::
Enable or disable untracked cache feature. Please use
`--test-untracked-cache` before enabling it.
+
These options take effect whatever the value of the `core.untrackedCache`
configuration variable (see linkgit:git-config[1]). But a warning is
emitted when the change goes against the configured value, as the
configured value will take effect next time the index is read and this
will remove the intended effect of the option.
--test-untracked-cache::
Only perform tests on the working directory to make sure
untracked cache can be used. You have to manually enable
untracked cache using `--untracked-cache` or
`--force-untracked-cache` or the `core.untrackedCache`
configuration variable afterwards if you really want to use
it. If a test fails the exit code is 1 and a message
explains what is not working as needed, otherwise the exit
code is 0 and OK is printed.
--force-untracked-cache::
Same as `--untracked-cache`. Provided for backwards
compatibility with older versions of Git where
`--untracked-cache` used to imply `--test-untracked-cache` but
this option would enable the extension unconditionally.
--fsmonitor::
--no-fsmonitor::
Enable or disable files system monitor feature. These options
take effect whatever the value of the `core.fsmonitor`
configuration variable (see linkgit:git-config[1]). But a warning
is emitted when the change goes against the configured value, as
the configured value will take effect next time the index is
read and this will remove the intended effect of the option.
\--::
Do not interpret any more arguments as options.
<file>::
Files to act on.
Note that files beginning with '.' are discarded. This includes
`./file` and `dir/./file`. If you don't want this, then use
cleaner names.
The same applies to directories ending '/' and paths with '//'
USING --REFRESH
---------------
`--refresh` does not calculate a new sha1 file or bring the index
up to date for mode/content changes. But what it *does* do is to
"re-match" the stat information of a file with the index, so that you
can refresh the index for a file that hasn't been changed but where
the stat entry is out of date.
For example, you'd want to do this after doing a 'git read-tree', to link
up the stat index details with the proper files.
USING --CACHEINFO OR --INFO-ONLY
--------------------------------
`--cacheinfo` is used to register a file that is not in the
current working directory. This is useful for minimum-checkout
merging.
To pretend you have a file at path with mode and sha1, say:
----------------
$ git update-index --add --cacheinfo <mode>,<sha1>,<path>
----------------
`--info-only` is used to register files without placing them in the object
database. This is useful for status-only repositories.
Both `--cacheinfo` and `--info-only` behave similarly: the index is updated
but the object database isn't. `--cacheinfo` is useful when the object is
in the database but the file isn't available locally. `--info-only` is
useful when the file is available, but you do not wish to update the
object database.
USING --INDEX-INFO
------------------
`--index-info` is a more powerful mechanism that lets you feed
multiple entry definitions