git rm --cached filename
Per non tracciare più i file presenti in .gitignore:
Commit di eventuali modifiche in sospeso al codice:
git rm -r --cached .
Questo rimuove tutti i file modificati dall’indice (area di gestione temporanea):
git add .
Commit:
git commit -m ".gitignore at work"