Git diff UI problem


Hi. My local repo have one remote repo (submodule).

Submodule have one new revision. 

Now step by step:

git fetch origin main - ok

git diff origin main - ok php storm show me whats new is on 1 file

git diff origin main --only-names - i see one name of file with new revision

right click on this file inside php storm → git > show diff → Contents are identical - why???

right click on this file inside php storm → git → compare with revision - no latest remote revision


I know - git pull can update file but why i can't see diff before pull?



We have sorted this out via email, but will also answer here:

Git fetch will not modify the file locally as it only downloads new data from a remote repository hence the difference is not visible.
When you do git diff command, you are comparing your local master with the origin master and the difference is correctly shown.
However, in the IDE you are opening a local file and a diff that shows a difference between your local copy and uncommited changes.
If you want to compare master and origin master inside IDE and get new data locally, you can do that via IDE by going to a branch in the log (right click on origin/master), right click Show diff with working tree, pick a file you want to download and click Get from branch: (you can also use this screen to compare)