Git command: git rm -r

syntax

git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>…​

example

Remove the .setting folder from the repository

git rm -r --cached . Setting #--cached will not delete the local .settinggitcommit -m 'delete .setting dir'
git push -u origin master

will remove the files ignored by the .gitignore file from the repository

git rm -r --cached .
git add .
git commit
git push  -u origin master