Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows git,奇怪的上游入口,我无法摆脱_Windows_Git_Github - Fatal编程技术网

Windows git,奇怪的上游入口,我无法摆脱

Windows git,奇怪的上游入口,我无法摆脱,windows,git,github,Windows,Git,Github,如果我这样做 我明白了 这最后一条上游线阻止我添加一个我想要合并的真正上游 我的配置文件如下所示: origin https://..../foo.git (fetch) origin https://..../foo.git (push) upstream 当我这样做的时候 [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true

如果我这样做

我明白了

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

我的配置文件如下所示:

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

我怎样才能摆脱这个上游呢?

Git有几个设置config的作用域:
system
$(prefix)/etc/gitconfig
)、
global
~/.gitconfig
)和
local
.Git/config
)当前存储库)


由于您的
本地
范围中没有关于
上游
的内容,因此您必须检查
系统
全局
范围。它可以是对相关文件的写访问权限。

Git有几个设置配置的作用域:
system
$(前缀)/etc/gitconfig
)、
global
~/.gitconfig
)和
local
.Git/config
)当前存储库)


由于您的
本地
范围中没有关于
上游
的内容,因此您必须检查
系统
全局
范围。它可能只是对相关文件的写访问权限。

您是否尝试过
git remote rm upstream
?谢谢,但如果我这样做,我会得到:
错误:无法删除配置节“remote.upstream”
添加一个假的文件(复制
源文件
部分),然后重试:-删除假的文件有效。移除它也可以。但这会导致配置文件与以前相同,并且单个上游条目再次出现。您是否尝试过
git remote rm upstream
?谢谢,但如果我这样做,我会得到:
错误:无法删除配置节“remote.upstream”
添加一个伪条目(复制
源代码
部分)然后再试一次:-达丁假的成功了。移除它也可以。但是这会导致配置文件与以前一样,并且单一的上游条目再次出现。除了名称和电子邮件之外,global.gitconfig中没有任何内容,GIT\u INSTALL\u DIR/etc/gitconfig中没有任何内容?除了名称和电子邮件之外,global.gitconfig中没有任何内容,GIT\u INSTALL\u DIR/etc/gitconfig中没有任何内容?
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.