← Winnitude! Search  ·  Reader Mode (855 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 12 LINKS

Unable to remove directory when head is used · Issue #2101 · gitpython-developers/GitPython

Repository navigation

Unable to remove directory when head is used  #2101


New issue

New issue

Closed
Bug #2308
Closed
Unable to remove directory when head is used #2101 Bug #2308 Labels
waiting for feedback

Description

@cbfbl's profile cbfbl opened on Feb 16, 2026

GitPython version - 3.1.46
Python version - 3.13.9

Basically the following fails

import shutil
from git import repo

repo = Repo("some_url", "some_directory")
print(repo.head.commit.hexsha)
shutil.rmtree("some_directory")

Getting an error shutils rmtree failed and was not able to the delete the .git inside "some_directory"

Metadata

Metadata

Assignees

No one assigned

    Labels


    waiting for feedback

    Type

    Bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions