0

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 ?

Loic Dachary
  • 1,034
  • 1
  • 10
  • 24

1 Answers1

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