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

133 views Asked by At

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

There are 0 answers