← 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 →- Q1. Which command moves changes into the staging area?
- Q2. What does git status show?
- Q3. Which file tells Git to ignore nodemodules and .env?
- Q4. Which is the best commit message?
- Q5. What does git diff --staged show?
- Q6. Which two settings should you configure once before your first commit?
- Q7. You edited app.js but did not run git add. Which area holds the change?
- Q8. What does git diff with no options show?
- Q9. Why does every commit point to its parent?
- Q10. A teammate pushed a .env file with an API key to GitHub. What must happen?