Removing files from repository after adding them to gitingore :
git rm -r --cached .
then followed by
git add .