This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

diff [Aug. 2, 2011, 12:33 a.m.]


The diff command is used to compare changes between revisions.

git diff

The above example will show you the difference between your local directory and the repository from which it is cloned. The changes listed are not yet staged for a commit.

To show changes in the working directory since the last commit, use:

git diff HEAD

Further reading: