Git · Junior · Question 8 of 75

How do you see what is staged for the next commit?

Explanation

--staged (or its synonym --cached) compares the index with the last commit. It's worth checking before committing to make sure nothing extra is included.

Further reading

Problem with a question

Git · Junior · question 8

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