Remove folder and its contents from git/GitHub’s history
WARNING: git filter-branch is no longer officially recommended If you are here to copy-paste code: This is an example which removes node_modules from history git filter-branch –tree-filter “rm -rf node_modules” –prune-empty HEAD git for-each-ref –format=”%(refname)” refs/original/ | xargs -n 1 git update-ref -d echo node_modules/ >> .gitignore git add .gitignore git commit -m ‘Removing node_modules … Read more