As a newcomer to Git, can somebody please explain in relatively simple terms what git diff
actually does, without going into branching/merging etc?
From my experience I know the outcome of running it:
Any files in my working directory that are different to those in my repo will be returned by git diff
AS LONG AS they have not been put in the staging index.
If all my changes have been put in the staging index, git diff
will return nothing. To see my changes, I have to use git diff --staged
.
Is there a simple way to some this up? I can't quite get my head around the caveat about the staging index.