-
-
Notifications
You must be signed in to change notification settings - Fork 964
Closed
Labels
Description
I used GitHub Desktop to clone a repo with two branches from URL.
The following scripts only print the master branch.
repoRepo = git.Repo(os.getcwd())
print(repoRepo.heads)
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.
Thanks.