🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Git Basics: all 10 questions

Quiz: Git Basics · Question 5 of 10

What does git diff --staged show?

What does git diff --staged show?

  1. A.Untracked files
  2. B.The changes that are staged for the next commit
  3. C.All commits
  4. D.Remote changes
Answer & explanation

Correct answer: The changes that are staged for the next commit

Without --staged, git diff shows unstaged changes.

Can you get the rest right without peeking?

Take the timed Quiz: Git Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →