🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Git Basics: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Which command moves changes into the staging area?
  2. Q2. What does git status show?
  3. Q3. Which file tells Git to ignore nodemodules and .env?
  4. Q4. Which is the best commit message?
  5. Q5. What does git diff --staged show?
  6. Q6. Which two settings should you configure once before your first commit?
  7. Q7. You edited app.js but did not run git add. Which area holds the change?
  8. Q8. What does git diff with no options show?
  9. Q9. Why does every commit point to its parent?
  10. Q10. A teammate pushed a .env file with an API key to GitHub. What must happen?