Jesse Chung
Jan 25, 2022

.gitignore only ignores files that are not part of the repository yet. If you already git added some files, their changes will still be tracked. To remove those files from your repository (but not from your file system) use git rm --cached on them.

I used this to clear out a file, and then essentially they got removed but then readded during a the next commit. I chose the entire file

git rm — cached -r client

the -r was required to do so recursively (ie, remove files already on commit branch”