git,奇怪的上游条目,我无法摆脱

时间:2013-06-19 10:35:49

标签: windows git github

如果我这样做

git remote -v

我得到了

origin  https://..../foo.git (fetch)
origin  https://..../foo.git (push)
upstream

这最后一条上游线阻止我添加一个我想要合并的真实上游。

我的配置文件如下所示:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    url = https://..../foo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master 

当我做的时候

git fetch upstream

我收到此错误:

fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我怎样才能摆脱那个上游?

1 个答案:

答案 0 :(得分:1)

Git有几个范围,其中设置了配置:system$(prefix)/etc/gitconfig),global~/.gitconfig)和local.git/config当前的存储库)。

由于upstream范围内没有关于local的内容,因此您必须检查systemglobal范围。它可能只是对相关文件的写访问权限。