Completely remove files from Git repo and remote on GitHub

This is what you’re looking for: ignoring doesn’t remove a file. I suggest you read that page, but here’s the specific command to use: git filter-branch –index-filter \ ‘git rm -r –cached –ignore-unmatch <file/dir>’ HEAD Also, to remove all the deleted files from caches git creates, use: rm -rf .git/refs/original/ && \ git reflog expire … Read more