Your configuration specifies to merge with the

2019-01-31 22:09发布

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

12条回答
对你真心纯属浪费
2楼-- · 2019-01-31 22:11

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:

git commit -m 'first commit' // on remote branch
git pull // on local branch
查看更多
啃猪蹄的小仙女
3楼-- · 2019-01-31 22:11

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 run git fetch with repository url.

查看更多
该账号已被封号
4楼-- · 2019-01-31 22:13

If another pull just works, it means your internet wasn't connected.

查看更多
来,给爷笑一个
5楼-- · 2019-01-31 22:16

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.

查看更多
兄弟一词,经得起流年.
6楼-- · 2019-01-31 22:22

Check if your remote branch is available to pull. I had the same issue, finally realized the remote branch was deleted by someone.

查看更多
疯言疯语
7楼-- · 2019-01-31 22:23

Just check if someone deleted the branch at remote.

查看更多
登录 后发表回答