git pull from remote but no such ref was fetched?

Check the branch you are on (git branch), check the configuration for that branch (in .../.git/config), you probably are on the wrong branch or your configuration for it tells to merge with a (now?) non-existent remote branch.


In my case, my local branch was not set to track the remote branch. I had to manually run:

git pull origin remotebranch

Then next time you do a push do "git push -u" to set up correct tracking.


In my case, my local branch and remote branch had different capitalization.

To resolve this I deleted my local branch $ git branch -d branch-name, then checked out the remote branch again using $ git fetch and $ git checkout Branch-name.

Tags:

Git