[Python] How to get branches instead of git.Head "ref/head/dev"?

Discussão em 'Python' iniciado por Stack, Julho 2, 2025.

  1. Stack

    Stack Membro Participativo

    I am using GitPython

    from git import Repo
    r=Repo(url)
    repo_heads=r.heads


    I got

    git.Head "ref/head/dev"


    what should I changet to get the list of branches,"main",""dev"...?

    Continue reading...

Compartilhe esta Página