我最近安装了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
>>>