我知道我可以看到哪个上游分支正在被本地分支跟踪,通过运行git branch
double verbose:
dino@DINO:$ git branch -vv
master b567464 [origin/master] mav cross point example
p516p 198bf21 [joesmith/master] start adding docs
p516test 198bf21 start adding docs
* pull_507 4ceafac [soandso/master] restore blah blah blah.
zorder 13f8d22 [origin/zorder] initial `zorder` tests
远程跟踪分支(如果有的话)显示在方括号中。
我的问题是:这些信息在哪里,本地分支和远程分支之间的关联,存储?
我已经在.git/refs/
和.git/remotes/
下摸索了一下,但我找不到任何东西,例如,列出了分支p516p
与远程joesmith/master
之间的关联。
p516test
指向与p516p
相同的引用,但是p516test
没有跟踪任何远程。我故意这样设置,希望通过比较p516p
与p516test
的信息来找到跟踪远程存储的位置;
这是在.git/config
。例如:
[branch "main"]
remote = origin
merge = refs/heads/main