assume-unchanged
is designed for cases where it is expensive to check whether a group of files have been modified;
when you set the bit, git
(of course) assumes the files corresponding to that portion of the index have not been modified in the working copy.
So it avoids a mess of stat calls.
This bit is lost whenever the file's entry in the index changes (so, when the file is changed upstream).
skip-worktree
is more than that: even where git
knows that the file has been modified (or needs to be modified by a reset --hard
or the like), it will pretend it has not been, using the version from the index instead.
This persists until the index is discarded.