Checking out PR (and branch) from existing PR (git worktree)
First, we need to configure to fetch PRs. We will add to .git/config which is located under root/config for git worktree repos:

After we fetch all PRs and included metadata with a simple git fetch. This will fetch lots of metadata for big repos.
# Checkout PR
After we are able to pull PRs from with the prefix pr/, which is known by git as the repo for PRs. It will automatically checkout the associated branch.
|
|
I had trouble checking out the branch associated with the PR. I would find and could checkout with
git worktree add simon/<name-i-want> <existing-branch-name>, but opened the git history, the commit from the PR wouldn’t be there. Checking out the PR instead as explained above, it works like a charm.
Origin: Checking out GitHub pull requests to a local branch · Blag