Skip to content

Repo.heads only shows the master branch #1167

Answered by Byron
mengjade asked this question in Q&A
Discussion options

You must be logged in to vote

I believe what's at display here is a 'smart' feature implemented specifically to list local branches as well as remote branches. This explains why GitPython sees these as heads only after they have been checked out once, after all, this would create a local tracking branch.

In order to emulate this feature, one would have to look at remote branches as well.
I am closing this issue as Q&A, please feel free to keep posting here with follow ups as you see fit.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1079 on February 26, 2021 11:18.