If after you’ve updated .gitignore to ignore a file and the changes are not being ignored, do the following:
git rm /path/to/your/file --cached
This will remove the file from the repository, but not from the file system.
If after you’ve updated .gitignore to ignore a file and the changes are not being ignored, do the following:
git rm /path/to/your/file --cached
This will remove the file from the repository, but not from the file system.