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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…