Add files to be forgotten to your .gitignore file:
echo "[filename1.ext] \n[filename2.ext] \n[evenafulldirectory/]" >> .gitignoreFrom root of the repo run:
git rm -r --cached . > /dev/null && git add --allThen commit changes:
git commit -m "remove gitignored files"Or if you don't want to add a new commit:
git commit --amend --no-editNote: The last command appends the new changes to the last commit(!)