remove files that are in gitignore from repo code example
Example 1: git remove file from gitignore
git rm --cached <file>
Example 2: git remove all files in gitignore
git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached
git rm --cached <file>
git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached