remove a folder from git tracking

C++
git rm -r --cached path_to_your_folder/
rm -rf .git
Source

Also in C++: