Completely remove files from Git repo and remote on GitHub
I accidentally added a folder of images and committed. Then, I made one more commit. Then I removed those files using git rm -f ./images and committed again. Right now, I have made a lot more commits in that branch (master). In my HEAD, I don't have that ./static/images folder. Due to this, my repo size has increased a lot. How can I remove those blobs completely? And I want to remove it from my remote GitHub repo too. Darhuuk 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