我最近安装了 python-git 包,当尝试按照以下链接的教程进行操作时,我发现某些方法丢失了......
http://packages.python.org/GitPython/0.3.2/tutorial.html#tutorial-label
这是我的解释器的结果:
>>> from git import *
>>> repo = Repo.init('/home/deostroll/scripts/synchost')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'Repo' has no attribute 'init'
>>> repo = Repo('/home/deostroll/scripts/synchost')
>>> repo.is_dirty()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'bool' object is not callable
>>>