How to get branch name if checked out to origin/branch with pygit2?

Viewed 67

If the cloned repo is in detached HEAD state and points to origin/<branch>, how do I get the original branch name?

git status shows HEAD detached at origin/<branch>, so it should be possible to retrieve the name.

0 Answers
Related