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

I checked OpenSSL with git clone git://git.openssl.org/openssl.git

. I made changes to sources, added documentation and released git add doc/crypto/<file>

.

When I execute git diff

, the new file is not included in the changes.

How do I get Git to enable the diff change? Or how do I create a diff with changes?

+3


source to share


2 answers


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

git diff [remote_name]/master

      



If you are remote, upstream

you can do:

git diff upstream/master

      

+2


source


git diff

, by default, does not show staged changes (i.e. changes that were git add

ed). If you want to view them, you need to use git diff --cached

.



+4


source







All Articles