How to delete directory containing .git in python
<p>I am not able to override/delete the folder containing .git in python. I am working on the below configuration:</p>

<ul>
<li>OS - Windows 8</li>
<li>Python - 3.5.2</li>
<li>Git - 2.9.2</li>
</ul>

<p>Any Help would be appreciated.</p>

<p>You should be using shutil to remove a directory that's not empty. If <code>os.rmdir</code> is used on a directory that's not empty an exception is raised. </p>

<pre><code>import shutil

shutil.rmtree('/.git')
</code></pre>

python git