If you want to view locally the same diff as the one you see in your PR, you need to run :
git difftool main...foo # 3 dots, not a typo
The 3 dots notation for git diff is explained in the doc :
This form is to view the changes on the branch containing and up to the second , starting at a common ancestor of both . git diff A...B
is equivalent to git diff $(git merge-base A B) B
. You can omit any one of <commit>
, which has the same effect as using HEAD instead.
It will show you the diff of your branch since it forked from main
-- as opposed to the diff between your branch and the current state of main
, which may change if other branches are merged.