我可以通过以下方式查看我的本地分支机构:
$ git branch
1364_29
master
* pp_master
这些分支来自不同的远程存储库,我知道找出它们究竟来自哪个存储库的唯一方法是检查我的.git/config
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:myshare/webkit2-pp.git
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "base"]
url = git@github.com:myshare/base.git
fetch = +refs/heads/*:refs/remotes/base/*
[branch "pp_master"]
remote = origin
merge = refs/heads/pp_master
[branch "1364_29"]
remote = base
merge = refs/heads/1364_29
有没有简单的方法列出他们的关系?例如:
$ git ...
1364_29 base/1364_29 git@github.com:myshare/base.git
master origin/master git@github.com:myshare/webkit2-pp.git
* pp_master origin/pp_master git@github.com:myshare/webkit2-pp.git