Is the are git diff
command to compare the merge base of the current branch and the working copy?
If you current branch is not master, you can try in a bash shell:
git diff $(git merge-base --fork-point master)
If uses git merge-base
with --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>
.