I would like to iterate over all the references using the GitPython API, in the same way git for-each-ref does it. How can I do that ?
Asked
Active
Viewed 492 times
1 Answers
0
On a repository created with
import git
r = git.Repo('.')
the r.refs
data member is a list of all the references, as it would be returned by git for-each-ref
(see http://gitpython.readthedocs.org/en/stable/reference.html#git.repo.base.Repo.refs for more information).

Loic Dachary
- 1,034
- 1
- 10
- 24