Search code examples
gitgit-diff

Added file with 'git add', but not reflected in 'git diff'


I checked out OpenSSL with git clone git://git.openssl.org/openssl.git. I made a change to the sources, added documentation, and issued git add doc/crypto/<file>.

When I perform a git diff, the new file is not included in the changes.

How do I force Git to include the change in the diff? Or how do I create a diff with the changes?


Solution

  • You can add the path to the repo and see if that works. Try:

    git diff [remote_name]/master
    

    If you're remote is upstream you can do:

    git diff upstream/master