删除已经提交的ignore file

To untrack a single file that has already been added/initialized to your repository, i.e., stop tracking the file but not delete it from your system use:

1
git rm --cached filename

To untrack every file that is now in your .gitignore:

First commit any outstanding code changes, and then, run this command:

1
git rm -r --cached .

This removes any changed files from the index(staging area), then just run:

1
git add .

Commit it:

1
git commit -m ".gitignore is now working"