After adding .gitignore file, commands git ls-files -z --ignored --exclude-standard | xargs -0 git rm --cached
and git commit -m "Repository cleanup adter adding .gitignore"
can be used to delete all committed files from git.
Command git log --all --pretty=format: --name-only --diff-filter=D -E $COMMIT -- *.user
lists all deleted .user files in given commit.