Situation: I\'ve just cloned a git repo, and then I configure the smudge filter for the repo. There are .gitattributes
files scattered around the repo that spec
You can remove the Git index and let Git rescan it to aware the changes. Then you can checkout all the files which have a smudge filter on them.
# remove Git index
rm .git/index
# rescan index
git reset HEAD -- .
# checkout all the files which have a smudge filter on them
git ls-files --modified | grep -v .gitattributes | awk '{print "git checkout HEAD -- \""$1"\""}' | bash
Note: Save your uncommitted changes before the re-checkout, otherwise, all your modifications on those smudge-filter-applied files will be overridden.