This question should be related to:
- 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
But I am wondering how to do that through pygit2?