If I run git diff
I would expect to see a list of changes of my working directory relative to whatever had been committed before (or a list of the working direc
GIT DIFF DOESN'T WORK AFTER STASH
Someone may run into this after attempting to apply stashed changes like I did.
git pull
) then git stash apply
(possibly with merge conflict)At this point simply stash your changes again (git stash
), do git pull
to ensure everything is up to date (because I'm paranoid about it), double check that all files are up to date in working directory (possibly run rsync if dealing with remote/local), then attempt to git stash apply
again and it should work!
In answer to the original question, git diff
isn't showing anything because you have a brand new directory, with a newly added file, but there are zero changes in the file for git diff to show. git status
is showing that you added a new file, but git diff
is for showing changes within files. If you made changes to the file, committed it, then made additional changes to it and ran git diff
it would then show you the changes to the file.