Git:“通配符refspec”,在拉动时没有遥控器上的匹配

时间:2012-12-10 10:30:58

标签: git

我在cloufforge设置了一个新的Git存储库,但有一些不寻常的问题。

When I do a git pull origin master

From https://dndigital.git.cloudforge.com/project
 * branch            master     -> FETCH_HEAD
Already up-to-date.

但如果一位同事做同样的事情,他会一遍又一遍地重复同样的信息,而不会得到“已经及时更新”

remote: Counting objects: 85, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 76 (delta 59), reused 19 (delta 13)
Unpacking objects: 100% (76/76), done.
From https://dndigital.git.cloudforge.com/project
 * branch            master     -> FETCH_HEAD
There are no candidates for merging among the refs that you just fetched.
Generally this means that you provided a wildcard refspec which had no
matches on the remote end.

为什么会这样呢?

更新

我尝试了建议的答案,看不出任何问题。但似乎问题是我们使用不同的git客户端。拥有不同版本的Git客户端似乎会出现问题。那太复杂了。有没有办法将Git的功能仅限于某个git版本,以便最早的Git客户端仍可以工作?

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = https://username@dndigital.git.cloudforge.com/project.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[user]
    name = 
    email = 
[giggle]
    file-view-path = agile/includes/SiteConfig.php
[gui]
    wmstate = zoomed
    geometry = 787x379+512+242 248 420

2 个答案:

答案 0 :(得分:7)

看一下你同事的.git/config,似乎git不知道远程分支origin/master需要合并到他的本地master分支。

你应该有这样的配置

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = ...
[branch "master"]
    remote = origin
    merge = refs/heads/master

请注意,git pull会有git fetch,然后是git merge。你可以分步试一试,看看出了什么问题。

git checkout master
git fetch origin
git merge origin/master

答案 1 :(得分:7)

嘿我刚遇到同样的问题,但这是由于目标文件夹空间不足造成的。如果没有别的办法,可能会帮助检查。