Clive Portman: code

Clear recent files adding to .gitignore

Update the .gitignore file with the necessary files or folders, then open Git Shell (or similar) and run:

git rm -r --cached .

then

git add .

And you're good to go.

Hat tip: Matt Frear's answer here