Questa domanda dovrebbe essere correlato a:Come ottenere il corrente estratto Nome del ramo Git tramite pygit2?
- How to get the current branch name in Git?
- Get git current branch/tag name
- How to get the name of the current git branch into a variable in a shell script?
- How to programmatically determine the current checked out Git branch
ma mi chiedo come fare attraverso pygit2?
http://www.pygit2.org/references. html # the-head - 'repo.head' non ha fatto quello che volevi? –
Ti dispiacerebbe pubblicarlo come risposta? Credo che potrebbe aiutare anche gli altri :) – Drake