@@ -15,6 +15,7 @@ SYNOPSIS
1515 [--cacheinfo <mode> <object> <file>]\*
1616 [--chmod=(+|-)x]
1717 [--assume-unchanged | --no-assume-unchanged]
18+ [--skip-worktree | --no-skip-worktree]
1819 [--ignore-submodules]
1920 [--really-refresh] [--unresolve] [--again | -g]
2021 [--info-only] [--index-info]
@@ -99,6 +100,13 @@ in the index e.g. when merging in a commit;
99100thus, in case the assumed-untracked file is changed upstream,
100101you will need to handle the situation manually.
101102
103+ --skip-worktree::
104+ --no-skip-worktree::
105+ When one of these flags is specified, the object name recorded
106+ for the paths are not updated. Instead, these options
107+ set and unset the "skip-worktree" bit for the paths. See
108+ section "Skip-worktree bit" below for more information.
109+
102110-g::
103111--again::
104112 Runs 'git-update-index' itself on the paths whose index
@@ -304,6 +312,27 @@ M foo.c
304312<9> now it checks with lstat(2) and finds it has been changed.
305313
306314
315+ Skip-worktree bit
316+ -----------------
317+
318+ Skip-worktree bit can be defined in one (long) sentence: When reading
319+ an entry, if it is marked as skip-worktree, then Git pretends its
320+ working directory version is up to date and read the index version
321+ instead.
322+
323+ To elaborate, "reading" means checking for file existence, reading
324+ file attributes or file content. The working directory version may be
325+ present or absent. If present, its content may match against the index
326+ version or not. Writing is not affected by this bit, content safety
327+ is still first priority. Note that Git _can_ update working directory
328+ file, that is marked skip-worktree, if it is safe to do so (i.e.
329+ working directory version matches index version)
330+
331+ Although this bit looks similar to assume-unchanged bit, its goal is
332+ different from assume-unchanged bit's. Skip-worktree also takes
333+ precedence over assume-unchanged bit when both are set.
334+
335+
307336Configuration
308337-------------
309338
0 commit comments