4 ms·
I applaud this effort, but it's still not hitting the right notes, eg: > how to show the changes of a file in the staging area: git diff --staged Ok, but this
by jmmcd 8y ago
I applaud this effort, but it's still not hitting the right notes, eg:
> how to show the changes of a file in the staging area: git diff --staged
Ok, but this shows the diff against what: the file in the working directory, the file in the local repo, or the file in the remote repo?
- jononor 8y agoAgreed that this is lacking. Staged is what will be included in the next commit (as made by git commit). So it is a diff against HEAD (current commit). Also, it does not show a particular file, but all the changes in the staging area. To show only one file have to do `git diff --staged -- src/myfile.c`