配置git secondary repo

时间:2011-05-17 05:38:29

标签: git repository

由于某些原因,git log repo2/master..master -- .对我不起作用("fatal: bad revision 'repo2/master..master'",同样适用于git checkout repo2/master -- .)。我的配置如下所示:

[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = ssh://me@domain.com/var/git/me/repo.git
[remote "repo2"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = ssh://me@domain.com/var/git/me/repo2.git

运行git checkout origin/master -- .没问题,因此问题仅适用于“repo2”。谢谢!

1 个答案:

答案 0 :(得分:6)

repo2的抓取不应该是:

fetch = +refs/heads/*:refs/remotes/repo2/*