Git – some files are marked as changed but ‘git diff’ doesn’t show anything

Do a git diff --cached – it compares the HEAD and index, ie stuff added for commit.

Just a git diff is between index and working directory, so if all the changes have been staged for commit, you won’ see anything in git diff

The third form is git diff <commit> which compares working directory and commit. So doing git diff HEAD will also give you the diff that you want as well.

Leave a Comment

File not found.