我得到这个错误拉:

您的配置指定与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

当前回答

重命名本地分支

Git分支-m temp

显示所有分支

Git分支-a

签出特定的远程分支

Git checkout main

删除临时分支

Git分支-d temp

其他回答

检查您的远程分支是否可用。 我也有同样的问题,最后意识到远程分支被某人删除了。

当实际原因是磁盘已满时,我得到了类似的错误。在删除了一些文件后,git开始像我预期的那样工作。

您可以通过运行以下命令轻松地将本地分支与远程分支连接起来:

git checkout <your-local-branch>
git branch --set-upstream-to=origin/<correct-remote-branch> <your-local-branch>
git pull

非正式的,但是删除我的本地项目并重新克隆是有效的。

我这样做是安全的,因为我从来没有为合并开发过分支。

当我在我的根项目中运行'git pull'命令时,出现了以下错误:

命令: git拉

错误: 你的配置指定与ref 'refs/heads/main'合并 从遥控器,但没有这样的裁判。

情况: 我只是删除了。git文件夹,并通过在我的根项目文件夹中运行git init命令重新初始化。git(再次创建。git文件夹),它工作了。