GitPython Incapaz de Encontrar Head Commit

Quero obter o objeto de confirmação do HEAD do meu repo. Quando tento ligarrepo.head.commit no entanto, recebo o seguinte erro:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36-32\lib\site-packages\git\refs\symbolic.py", line 200, in _get_commit
    obj = self._get_object()
  File "C:\Python36-32\lib\site-packages\git\refs\symbolic.py", line 193, in _get_object
    return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
  File "C:\Python36-32\lib\site-packages\git\objects\base.py", line 64, in new_from_sha
    oinfo = repo.odb.info(sha1)
  File "C:\Python36-32\lib\site-packages\git\db.py", line 37, in info
    hexsha, typename, size = self._git.get_object_header(bin_to_hex(sha))
  File "C:\Python36-32\lib\site-packages\git\cmd.py", line 1073, in get_object_header
    return self.__get_object_header(cmd, ref)
  File "C:\Python36-32\lib\site-packages\git\cmd.py", line 1062, in __get_object_header
    return self._parse_object_header(cmd.stdout.readline())
  File "C:\Python36-32\lib\site-packages\git\cmd.py", line 1024, in _parse_object_header
    raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip()))
ValueError: SHA could not be resolved, git returned: b''

Chamandorepo.head.commit uma segunda vez (e todas as vezes depois), recebo o seguinte erro:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36-32\lib\site-packages\git\refs\symbolic.py", line 200, in _get_commit
    obj = self._get_object()
  File "C:\Python36-32\lib\site-packages\git\refs\symbolic.py", line 193, in _get_object
    return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
  File "C:\Python36-32\lib\site-packages\git\objects\base.py", line 64, in new_from_sha
    oinfo = repo.odb.info(sha1)
  File "C:\Python36-32\lib\site-packages\git\db.py", line 37, in info
    hexsha, typename, size = self._git.get_object_header(bin_to_hex(sha))
  File "C:\Python36-32\lib\site-packages\git\cmd.py", line 1073, in get_object_header
    return self.__get_object_header(cmd, ref)
  File "C:\Python36-32\lib\site-packages\git\cmd.py", line 1061, in __get_object_header
    cmd.stdin.flush()

Informação adicional:repo.head -><git.HEAD "HEAD">

Estou em um ambiente Windows 10. Isso pode estar relacionado a outra pergunta minha:Git não funciona no Ubuntu -> Diretório compartilhado do Windows Samba

questionAnswers(1)

yourAnswerToTheQuestion