Git · Junior · Question 7 of 75

What does plain git diff show?

Explanation

git diff compares the working tree with the index. Use git diff --staged to see what will go into the next commit, and git diff HEAD for both.

Further reading

Problem with a question

Git · Junior · question 7

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz