git filter-branch remove all submodules from my repo
问题 Hello I have successfully rewrote history and got the 5 folders I wanted to extract using git filter-branch -f --prune-empty --tree-filter 'rm -rf <all unwanted dirs>' and kept all git history. The only remaining issue are submodules, I sill have commits doing Subproject commit <hash> and I want to completely remove ALL of those submodule commits from my git history, how can I accomplish this? 回答1: I have done it with git filter-branch -f --prune-empty --tree-filter ' git submodule deinit -f