我得到这个错误拉:

您的配置指定与ref合并 'refs/heads/feature/Sprint4/ABC-123-Branch',但没有 这样的裁判是拿来的。

这个错误不会出现在任何其他分支上。这个分支的特殊之处在于,它是从另一个分支的上一次提交中创建的。 我的配置文件如下:

[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

当前回答

也有可能在克隆存储库时,GitLab存储库中的权限只是丢失了。

其他回答

如果再拉一次还能用,说明你的网络没有连接。

检查一下是否有人远程删除了分支。

对我来说,这是因为我合并了一个分支开发到主使用web界面,然后尝试同步/拉使用VSCode在开发分支上打开。(这很奇怪,我不能改变到master没有得到这个错误。)

git pull
Your configuration specifies to merge with the ref 'refs/heads/dev'
from the remote, but no such ref was fetched.'

这是有意义的,没有找到它refs/heads/dev -对我来说,它更容易删除本地文件夹,并再次克隆。

在我的情况下,回购是暂时不可用的(在维护中)。

您可以编辑~/。Gitconfig文件在您的主文件夹。这是保存所有全局设置的地方。

或者,使用git config——global——unset-all remote.origin.url,然后运行git fetch with repository url。