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 between the current state of my code and the last commit. For example:

# show the changes between the working tree and the last commit
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.