how to know the diff in git add code example
Example: How do I show the changes which have been staged
git diff --staged # or you can use --cached (they are synoyms, see the source)
git diff --staged # or you can use --cached (they are synoyms, see the source)