Quick-Fire Quiz: Round Two
Harder questions.
Round two. These are a little harder, and they cover undoing, rebasing and teamwork.

- Round two
- A little harder
- Undo, rebase, teamwork
Question 6
You committed a typo in the message, and haven't pushed. Fastest fix? Git commit dash dash amend, git revert, or git reset dash dash hard? The answer is amend. It replaces the last commit, which is fine before sharing.
Question 7
A bad commit was pushed to main last week, and everyone has it. How do you undo it? Git reset dash dash hard, git revert, or interactive rebase? The answer is revert. It adds a new commit, and doesn't rewrite shared history.
Question 8
You ran git reset dash dash hard, and lost a commit you needed. Where can you find it? In git log, in git reflog, or nowhere, it's gone? The answer is git reflog. It remembers where head has been.
Question 9
What does git pull do? Only downloads commits, fetches and then merges, or uploads your commits? The answer is fetch, then merge. Fetch alone only downloads, and push uploads.
Question 10
Which commits should you never rebase? Commits on your own feature branch, commits that only exist on your computer, or commits that others have already pulled? The answer is commits others already have. That's the golden rule of rebase.
Summary
Ten questions. If you got most of them right, you really know Git. Next, a cheat sheet of everything, in one place.
Key takeaways- amend before sharing
- revert after sharing
- Never rebase shared commits