To synthesize the excellent original answers from @adardesign, @adswebwork and @AnkitVishwakarma, and comments from @Bdoserror, @Retsam, @seanf, and @torek, with additional documentation links and concise aliases...
Basic Commands
To reset a file that is assume-unchanged back to normal:
git update-index --no-assume-unchanged <file>
To list all files that are assume-unchanged:
git ls-files -v | grep '^[a-z]' | cut -c3-
To reset all assume-unchanged files back to normal:
git ls-files -v | grep '^[a-z]' | cut -c3- | xargs git update-index --no-assume-unchanged --
Note: This command which has been listed elsewhere does not appear to reset all assume-unchanged files any longer (I believe it used to and previously listed it as a solution):
git update-index --really-refresh
Shortcuts
To make these common tasks easy to execute in git, add/update the following alias section to .gitconfig
for your user (e.g. ~/.gitconfig
on a *nix or macOS system):
[alias]
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
unhide-all = ! git ls-files -v | grep '^[a-z]' | cut -c3- | xargs git unhide --
hidden = ! git ls-files -v | grep '^[a-z]' | cut -c3-