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
I think I found a solution, and it's unbelievably simple: Order of the lines with fetch = +refs...
matters!
I changed:
[remote "origin"]
url = https://github.com/the/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to:
[remote "origin"]
url = https://github.com/the/repo.git
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
fetch = +refs/heads/*:refs/remotes/origin/*
(last two lines swapped)
Now everything works (fetch
, checkout
, pull
).
I'm still waiting to see some (un)expected problems with this configuration, but so far so good...