git remove from folder

C++
git rm -r --cached <folder>
git commit -m "Removed Folder"
git push origin masterrm -rf .git
Source

Also in C++: