I am getting this error for pull:
Your configuration specifies to merge with the ref 'refs/heads/feature/Sprint4/ABC-123-Branch' from the remote, but no such ref was fetched.
This error is not coming for any other branch.
The special thing about this branch is that it is created from the previous commit of another branch.
My config file looks like:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = <url here>
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "new-develop"]
remote = origin
merge = refs/heads/new-develop
[branch "feature/Sprint4/ABC-123-Branch"]
remote = origin
merge = refs/heads/feature/Sprint4/ABC-123-Branch
In my case I was simply lacking of initial commit on remote branch, so local branch wasn't finding anything to pull and it was giving that error message.
I did:
You can edit the
~/.gitconfig
file in your home folder. This is where all --global settings are saved.Or, use
git config --global --unset-all remote.origin.url
and after rungit fetch
with repository url.If another pull just works, it means your internet wasn't connected.
I got a similar error when the actual cause was that my disk was full. After deleting some files,
git pull
began to work as I expected.Check if your remote branch is available to pull. I had the same issue, finally realized the remote branch was deleted by someone.
Just check if someone deleted the branch at remote.