how to remove files from repo which are added to the gitignore but are still manages code example
Example: git remove all files in gitignore
git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached
git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached