找到2个远程分支之间的区别

mic*_*ael 14 git

如何找出2个远程分支之间的区别?

我试过了:

git diff --name-status remotes/branch-V4.4..remotes/branch-V4.2
Run Code Online (Sandbox Code Playgroud)

但它给了我一个变化的文件列表.有没有办法让我得到一份提交列表,告诉我两个分支之间的区别?

谢谢.

更新:

谢谢你的回答.我试过'git log --graph remotes/branch-V4.4 ... remotes/branch-V4.2'

我知道了

* commit ............
|
|
| 
* commit .............
|
|
| 
* commit .............|
|
| 
* commit .............
Run Code Online (Sandbox Code Playgroud)

为什么只有"|" ,一条直线?为什么它没有显示2个分支在哪里开始分歧?

谢谢.

Chr*_*ial 15

您正在寻找的可能是:

gitk --left-right remotes/branch-V4.4...remotes/branch-V4.2
Run Code Online (Sandbox Code Playgroud)

或者如果gitk不可用:

git log --oneline --graph --decorate --left-right --boundary --date-order remotes/branch-V4.4...remotes/branch-V4.2
Run Code Online (Sandbox Code Playgroud)

您可能还想尝试不使用它--date-order,但特别是在复杂的情况下,我发现git log使用该选项可以生成更多有用的图形.

该图中的每个提交都将标记为<,>o- 这意味着它们是左分支,右分支或"边界提交"的一部分.


And*_*all 5

使用git log代替git diff

git log remotes/branch-V4.4..remotes/branch-V4.2
Run Code Online (Sandbox Code Playgroud)