方法一 进入项目根目录下 find . -name ".git" | xargs rm -rf 方法二 PyCharm上设置: File --> Settings --> Version Control --> 点 Git 选择 <none>