Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

git.exc.InvalidGitRepositoryError  #1112

Copy link
Copy link
Open
@mohoray

Description

@mohoray
Issue body actions

Following is the snippet of the code I am using.

import git
repo = git.Repo(search_parent_directories=True)
branch = repo.active_branch

After running the code, I have received the following error.

File "/home/user_name/.local/lib/python3.8/site-packages/git/repo/base.py", line 181, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/user_name/.local/lib/python3.8/site-packages/git/repo

It will be really great if I get some suggestions about solving this error. I am using gitpython version 3.1.12.

Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.