Using git ls-files instead of .gitignore to list files that should be deleted before checkout