find ./* -type d -name ".git" -exec rm -r {} \; //删除当前目录下所有.git的目录 find * -type d -name '.git' -exec rm -fr {} \;