Quick-Fire Quiz
Test yourself.
Let's test everything you've learned, with quick questions. For each one, pause, pick your answer, then listen to the explanation. Don't worry about getting some wrong. That's how learning sticks.

- Quick questions
- Pause and pick
- Mistakes help you learn
Question 1
You created a new file. Which command makes Git include it in the next commit? Git commit dash a m, git add, or git push? The answer is git add. Commit dash a only includes files Git already tracks, and push only uploads commits.
Question 2
Which command shows changes you've staged, but not committed yet? Git diff, git diff dash dash staged, or git status? The answer is git diff dash dash staged. Plain diff shows unstaged changes, and status only lists file names.
Question 3
You want to try an idea without touching main. What do you do? Commit on main and revert later, create a branch with git switch dash c, or clone the repository again? The answer is create a branch. Branches are cheap, and made exactly for this.
Question 4
Your push is rejected, because the remote contains work you don't have. What's the right fix? Git push dash dash force, git pull then git push, or delete your commit? The answer is pull, then push. Force would delete your teammate's work.
Question 5
A file is listed in dot git ignore, but Git still tracks it. Why? Because the ignore file is broken, because the file was already committed before being ignored, or because ignore only works on GitHub? The answer is, it was committed first. Use git r m dash dash cached to stop tracking it.
Summary
Five down. Next, round two, with harder questions.
Key takeaways- git add for new files
- diff --staged
- Pull, then push