I am quite new to Git, thus maybe I am missing something here.
dan@one:/var/www/$ git status -s
M GoogleChromeExtension.js
M ApiClient.js
So clearly 2 files have been changed.
But when I run:
git diff
no output is shown. I was expecting to get the changes between my working copy and the latest commit.
I am sure yesterday everything was working as expecting…
Is it maybe because I haven’t been pushing the changes to the remote server?
P.S.: I am using GitHub
Thanks,
Dan
Do a
git diff --cached– it compares the HEAD and index, ie stuff added for commit.Just a
git diffis between index and working directory, so if all the changes have been staged for commit, you won’ see anything ingit diffThe third form is
git diff <commit>which compares working directory and commit. So doinggit diff HEADwill also give you the diff that you want as well.