有没有办法让git status显示两个远程仓库?实际上,我将origin设置为GitHub项目的Fork,而将upstream设置为Fork的父级项目。在我的Fork的GitHub页面上,它列出了类似于以下内容:
.git/config
This branch is 1 commit ahead, 9 commits behind othergithubuser:master基本上,我想要用git status(或其他方式)来复制这个结果。
.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/mygithubuser/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "upstream"]
url = https://github.com/othergithubuser/project.git
fetch = +refs/heads/*:refs/remotes/upstream/*