We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Diff

The git diff command shows you the differences between... stuff. Differences between commits, the working tree, etc.

I frequently use it to look at the changes I haven't staged yet. For example:

# show the changes between the working tree and the index (unstaged changes)
git diff
# show the differences between the previous commit and the current state, including the last commit and uncommitted changes
git diff HEAD~1
# show the change between two commits
git diff COMMIT_HASH_1 COMMIT_HASH_2

Assignment

Diff the changes between the N and M commits. Remember, N reverted the changes from M.

Paste the full output of the diff into the textbox and submit it.