Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

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.

1 Answer

0 votes
by (62.9k points)

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

There are many more commands which you can learn on git commands

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...