git usuń wszystkie śledzone pliki po dodaniu git ignor

First:

git rm -r --cached .
git add .

Then:

git commit -am "Remove ignored files"
#---------------------
Or as a one-liner:
git rm -r --cached . && git add . && git commit -am "Remove ignored files"

Developer101