Traceback (most recent call last):
File "pythonProject\main.py", line 11, in <module>
repo = git.Repo.init(repo_path)
^^^^^^^^^^^^^^^^^^^^^^^^
File "pythonProject\.venv\Lib\site-packages\git\repo\base.py", line 1329, in init
return cls(path, odbt=odbt)
^^^^^^^^^^^^^^^^^^^^
File "pythonProject\.venv\Lib\site-packages\git\repo\base.py", line 289, in __init__
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: pythonProject\temp
The directory .custom_git gets created but the error happens. The same exception is raised when trying git.Repo(repo_path) instead of initialization with .innit(repo_path).
Version 3.1.43
Description:
I am trying to create or open a repo while also changing the .git default path to custom name like .custom_git. However, I a meeting an exception.
Example Code
Error
The directory
.custom_git
gets created but the error happens. The same exception is raised when trying git.Repo(repo_path) instead of initialization with .innit(repo_path).