I'm not sure why this doesn't work. When I do git branch -a
, this is what I see:
I'm trying to pull from the DownloadManager on the online GitHub repository. I have tried
- git pull, but then it complains about not knowing which branch to pull from
- git pull origin, doesn't know which branch
- git pull origin downloadmanager
fatal: Couldn't find remote ref downloadmanager. Unexpected end of commands stream
- git pull origin remotes/origin/DownloadManager
'fatal couldn't find remote ref remotes/origin/DownloadManager. Unexpected end of commands stream
Is there something I'm missing? In Xcode, When I try to connect to the repository, nothing ever shows up. I have been able to push to it in the past. But I can't push again until I pull the most recent changes.
I had this issue when after rebooted and the last copy of VSCode reopened. The above fix did not work, but when I closed and reopened VSCode via explorer it worked. Here are the steps I did:
If none of these answers work, I would start by looking in your
.git/config
file for references to the branch that makes problems, and removing them.The branch name in Git is case sensitive. To see the names of your branches that Git 'sees' (including the correct casing), use:
... and now that you can see the correct branch name to use, do this:
where 'BranchName' is the name of your branch. Ensure that you match the case correctly
So in the OP's (Original Poster's) case, the command would be:
For me, it was because I was trying to pull a branch which was already deleted from Github.
This is because your remote branch name is "DownloadManager“, I guess when you checkout your branch, you give this branch a new name "downloadmanager".
But this is just your local name, not remote ref name.
check your branch on your repo. maybe someone delete it.