git filter-branch -f --tree-filter ‘rm -rf nodemodules' -- --all git filter-branch -f --index-filter ‘git rm —cached —ignore-unmatch nodemodules' -- --all git filter-branch -f —prune-empty -- --all git config --global rerere.enabled true git add -p