This is a strange problem I'm observing in my IntelliJ. The show-diff always compare the current local version with the same old commit of git which is NOT the latest commit. Ideally, it should compare it with the latest commit. If the file was created after that commit then the error is "Not a valid object name ". To bypass this problem I have to RightClick->Git->Compare with and then select the latest version. Any clue what could be the issue? I have tried to search this commit id in the IntelliJ project folder but I couldn't find any. Also updated the Git CMD to the latest version but no relief.