git to ignore files

git rm --cached . -r 

create .gitignore file under root directory. then run git rm .