git ignore vendor folder not working

C++
git rm -r --cached vendor
Source

Also in C++: