git 工作副本和分支基础之间的区别

git diff between working copy and branch base

我可以比较大师的提示和我的工作副本

git diff master

我可以将当​​前分支的尖端与其来自 master 的合并基础与

进行比较
git diff master...

git diff命令是比较当前分支和工作副本的合并基础吗?

Is the are git diff command to compare the merge base of the current branch and the working copy?

如果你当前的分支不是master,你可以尝试bash shell:

git diff $(git merge-base --fork-point master)

如果将 git merge-base--fork-point 一起使用:

git merge-base --fork-point <ref> [<commit>]

Find the point at which a branch (or any history that leads to <commit>) forked from another branch (or any reference) <ref>.
This does not just look for the common ancestor of the two commits, but also takes into account the reflog of <ref> to see if the history leading to <commit> forked from an earlier incarnation of the branch <ref>.