The branch_ref.name prints "refs/remotes/origin/test" but git status says "HEAD detached at origin/test"
So I'm probably feeding the wrong thing into repo.checkout, but I'm honestly not sure what else it should be.
Funnily enough, git itself tries to do the right thing if pulled in a detached head state:
From https://github.com/testorg/example
* [new branch] test -> origin/test
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
So something like this was what I expected to work, but leaves the repo in detached head state:
The branch_ref.name prints "refs/remotes/origin/test" but git status says "HEAD detached at origin/test"So I'm probably feeding the wrong thing into repo.checkout, but I'm honestly not sure what else it should be.
Funnily enough, git itself tries to do the right thing if pulled in a detached head state: