Can't seem to checkout this pull request anymore
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I'm trying to git checkout pr/145
https://github.com/akshatpradhan/spoutlets/pull/145

I've followed the instructions here:
https://help.github.com/articles/checking-out-pull-requests-locally

But I keep getting this error and I'm never able to get pr/145.
https://gist.github.com/akshatpradhan/31818dcd1e5ed6f6a329

I was able to get it before, but now it stopped working and I can't figure out why.

awarded to ochi
Tags
git

Crowdsource coding tasks.

1 Solution

Winning solution

those two remotes should not be stored in the same namespace because your branch name is correct in both of them - just put it in another namespace e.g. "pr"

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly

[remote "origin"]
    url = https://github.com/akshatpradhan/spoutlets.git
    fetch = +refs/heads/*:refs/remotes/origin/*

[remote "pr"]
    url = https://github.com/akshatpradhan/spoutlets.git
    fetch = +refs/pull/*/head:refs/remotes/origin/pr/*

[branch "master"]
    remote = origin
    merge = refs/heads/master
@ochi why do these instructions from github place the 2 remotes in the same namespace then? https://help.github.com/articles/checking-out-pull-requests-locally
akshatpradhan almost 6 years ago
Also, I'm still not getting the most recent updates from pr/145. Look at the commit message I'm locally seeing: https://gist.github.com/akshatpradhan/6716168 And compare it to the last commit (been there button becomes un-been) made in the pull request: https://github.com/akshatpradhan/spoutlets/pull/145
akshatpradhan almost 6 years ago
really I don't know :) I did it like they want it and stumped upon same bug as you i switch to another namespace and it works :) when I find why it is I will tell you :)
ochi almost 6 years ago
please paste output of that command git log --graph --color --all --decorate --oneline
ochi almost 6 years ago
I get this "ambiguous error" after deleting the branch pr/145 locally from my machine. Perhaps a clue?https://gist.github.com/akshatpradhan/6716831
akshatpradhan almost 6 years ago
It seems that you pushed pr/145 into origin so now it's in both places - calling git branch -a just after checkout of fresh copy of your repo shows that. And that's why git warns you that it don't know where to look for it - cause with that configuration there are 2 paths that are correct for pr/145
ochi almost 6 years ago
ok, so I just did a git fetch origin && git fetch pr and that seemed to fix the issue. Thank you!
akshatpradhan almost 6 years ago