git compare local branch to remote code example
Example 1: compare local git branch with remote
git diff @{upstream}
Example 2: git overwrite local branch with remote
git reset --hard origin/master
git diff @{upstream}
git reset --hard origin/master