Git pull-fatal: couldn't find remote ref master

I'm not sure why this doesn't work. When I do git branch -a this is what I see:

enter image description here

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.

Answered by James Wilson

To solve couldn't find a remote ref master you should follow the below mentioned code. The branch name in Git is case sensitive. To see the names of your branches that Git 'sees' (including the correct casing), use:

  git branch -vv

and now that you can see the correct branch and can verify the case-correctness in the branch name, do this:

  git pull origin BranchName

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:

  git pull origin DownloadManager


Your Answer

Interviews

Parent Categories