Add preference EXCLUDE_GITIGNORE to exclude all files listed in .gitignore from being deleted if DELETE_FILES is set.