I have a big repository which currently contains multiple projects in top level subfolders, say /a, /b, /c, and /d.
/a
/b
/c
/d
I prefer this
git filter-branch -f --prune-empty --tree-filter "ls -I a -I b | xargs rm -rf" -- --all