Show differences for staged files

Download git eBook

Example

git diff --staged

This will show the changes between the previous commit and the currently staged files.

NOTE: You can also use the following commands to accomplish the same thing:

git diff --cached

Which is just a synonym for --staged or

git status -v

Which will trigger the verbose settings of the status command.

Stats

Contributors: 3
2016-07-27
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook