#To update your local.
git fetch --all
this will fetch everything from the remote, so when you check difference, it will compare the difference with the remote branch.
#to list all branches
git branch -a
the above command will display all the branches.
#to go to the branch you want to check difference
git checkout <branch_name>
#Make the changes
#to check on which branch you are in, use
Now, you can check difference as follows.
git diff origin/<branch_name> filename
git diff origin/master "src/main/java/com.abc.PhoneServiceImpl.java"
this will compare your local branch with the remote branch