GitPython - Getting Untracked Files
Asked Answered
M

1

5

The GitPython tutorial mentions the attribute untracked_files as the way to get the array of untracked files of a particular git repository.

However referring to this attribute results in the following error.

AttributeError: 'Repo' object has no attribute 'untracked_files'

What is the method in GitPython to get the list of untracked files?

Mislay answered 18/9, 2014 at 12:16 Comment(2)
What version of GitPython are you using? The untracked_files property was added in 0.2 (see the change log).Mariel
@Mariel : I had 0.1.7. Removed and installed 0.3.1-beta2. Thanks! Could you please add this comment as an answer so I can accept it?Mislay
M
10

The untracked_files property was added in GitPython v0.2 (see the change log).

You should check your installed version and upgrade if necessaary.

Mariel answered 18/9, 2014 at 14:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.