If I run \'git status\' on my repo it gives:
# On branch master
# Changes to be committed:
# (use \"git reset HEAD ...\" to unstage)
#
# modified
For Staging Area vs Repository comparison use
$git diff --staged
For Working vs Repository comparison use
$ git diff
but if a file is changed and added to staging area ($ git add fileName
) and we try to see the difference with ( $ git diff
). It will not return any difference since the file is in staging area and it will not be compared with the repository.