You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I switch to the other branch using GitHub Desktop, then it returns two heads. If I switch back to master again, it also shows two heads.
Is there a way to show all the heads at the beginning to avoid this manual work? For example, if I have 10 branches, i don't want to manually switch the branches 10 times to get them into Repo.heads.
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.
Activity
Byron commentedon Nov 8, 2020
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.