I don't see an option to checkout or list remote/local branches in this module: https://gitpython.readthedocs.io/en/stable/
For those who want to just print the remote branches:
# Execute from the repository root directory
repo = git.Repo('.')
remote_refs = repo.remote().refs
for refs in remote_refs:
print(refs.name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With