如何在python中删除包含.git的目录 [英] How to delete directory containing .git in python
本文介绍了如何在python中删除包含.git的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法覆盖/删除python中包含.git的文件夹.我正在进行以下配置:
I am not able to override/delete the folder containing .git in python. I am working on the below configuration:
- 操作系统-Windows 8
- Python-3.5.2
- Git-2.9.2
任何帮助将不胜感激.
推荐答案
尝试此代码
import shutil
shutil.rmtree('/path/to/your/dir/')
这篇关于如何在python中删除包含.git的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文