Recursive git update-index –assume-unchanged

update-index is an internal plumbing command and thus not as comfortable as the real front-end commands. You will have to handle the recursion bit yourself:

git ls-files -z myFolderToIgnore/ | xargs -0 git update-index --assume-unchanged

PSA: There is a high chance that assume-unchanged is not what you are looking for and you should use skip-worktree instead. See here for more info.

Leave a Comment