Stop tracking an entire directory. This is useful after having added the directory to .gitignore.
git rm -r --cached <your directory>
- Remove files from the working tree and from the index.
- Allow recursive removal when a leading directory name is given.
- Remove files from the index only (not the working tree).