Just wanted to leave a note since I couldn't find documentation on it anywhere and it took me a while to figure it out. In order to checkout an orphan branch named, for example, gh-pages, run:
repo.active_branch.checkout(orphan="gh-pages") # or: repo.head.ref.checkout
Just wanted to leave a note since I couldn't find documentation on it anywhere and it took me a while to figure it out. In order to checkout an orphan branch named, for example,
gh-pages, run: