为什么不让git让我从两个遥控器中取出?

时间:2016-07-14 21:55:11

标签: git github

  

我跟着these instruction设置了两个git遥控器。

当我git remote -v这是我得到的(除了我自己的回购名称)

all git@git.wpengine.com:staging/example.git (push)
all git@git.wpengine.com:staging/example.git (fetch)
all https://github.com/user/repo.git (push)
github  https://github.com/user/repo.git (push)
github  https://github.com/user/repo.git (fetch)
staging git@git.wpengine.com:staging/example.git (fetch)
staging git@git.wpengine.com:staging/example.git (push)

在查看我的配置后,它看起来与示例中的配置略有不同:

我的git config

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
[remote "staging"]
    url = git@git.wpengine.com:staging/example.git
    fetch = +refs/heads/*:refs/remotes/staging/*
[remote "github"]
    url = https://github.com/user/repo.git
    fetch = +refs/heads/*:refs/remotes/github/*
[remote "all"]
    url = git@git.wpengine.com:staging/example.git
    url = https://github.com/user/repo.git
[branch "master"]
    remote = all
    merge = refs/heads/master

示例中的Git配置

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "github"]
    url = https://github.com/user/repo.git
    fetch = +refs/heads/*:refs/remotes/(remote name)/*
[remote "staging"]
    url = git@git.wpengine.com:staging/example.git
    fetch = +refs/heads/*:refs/remotes/(remote name)/*
[remote "all"]
    url = https://github.com/user/repo.git
    url = git@git.wpengine.com:staging/example.git

all https://github.com/user/repo.git (fetch)时如何让git remote -v出现?

**

0 个答案:

没有答案