/ git

Update Git to respect a newly added .gitignore

Adding a .gitignore file to an existing project will prevent untracked files being added to the working tree but the files will still remain at the staging area (Git Index).

But not all is lost and it is possible to remove the files we want to ignore from Git Index.

git rm -r --cached . 
git add .