GitPython-获取未跟踪的文件

Cha*_*ila 2 python git gitpython

GitPython 教程提到了属性untracked_files 作为获取特定git存储库中未跟踪文件数组的方式。

但是,引用此属性会导致以下错误。

AttributeError: 'Repo' object has no attribute 'untracked_files'
Run Code Online (Sandbox Code Playgroud)

GitPython中获取未跟踪文件列表的方法是什么?

ise*_*dev 6

untracked_files属性已添加到GitPython v0.2中(请参阅更改日志)。

您应检查已安装的版本并根据需要进行升级。