git compare two files from different repo code example
Example 1: git check diff between two repositories
Just specify your local branch1 or remote origin/branch2
git diff branch1 origin/branch2 #show diff referenced from second branch
git diff branch1 branch2 file.txt #show diff only between file.txt
Example 2: git compare files with different names
git diff branch1:full/path/to/foo.txt branch2:full/path/to/foo-another.txt