I\'m aware of How can I check out a GitHub pull request?
While adding fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to .git/config
does al
From the fetch specs is not possible to find unambiguously find that remote reference refs/remotes/origin/pr/123
tracks origin:refs/pull/123/head
because origin:refs/heads/pr/123
is also possible. To help it, you could use different remote name for example:
[remote "origin-pr"]
url =
fetch = +refs/pull/*/head:refs/remotes/origin-pr/pr/*
Then git checkout with explicit branch name (which should be available in GUIs) would be able to create correct tracking reference:
$ git checkout -b pr/123 origin-pr/pr/123
[branch "pr/123"]
remote = origin-pr
merge = refs/pull/123/head
Though, looks like it is not possible to make simple git checkout br/123
work:
$ git checkout pr/123
error: pathspec 'pr/123' did not match any file(s) known to git.