Challenge - 5 Problems
Pull Request Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of git command showing pull request status
What is the output of the following git command when checking the status of a pull request branch locally?
Git
git fetch origin pull/42/head:pr-42 git checkout pr-42 git status
Attempts:
2 left
💡 Hint
Fetching a pull request creates a local branch named pr-42 tracking the PR head.
✗ Incorrect
The command fetches the pull request number 42 into a local branch pr-42. Checking out pr-42 puts you on that branch. git status shows 'Your branch is up to date with 'pr-42'.'
🧠 Conceptual
intermediate1:30remaining
Purpose of code review in pull requests
What is the main purpose of performing a code review in a pull request?
Attempts:
2 left
💡 Hint
Think about why teams review code before merging.
✗ Incorrect
Code review helps catch bugs, improve code quality, and maintain coding standards before merging changes into the main branch.
🔀 Workflow
advanced2:30remaining
Correct order of steps in a pull request review workflow
Arrange the steps in the correct order for a typical pull request code review workflow.
Attempts:
2 left
💡 Hint
Think about the natural flow from coding to review to update.
✗ Incorrect
First, the developer creates and pushes code (1), then opens a pull request (2). The reviewer then comments (3), and the developer updates the PR (4).
❓ Troubleshoot
advanced2:00remaining
Error when merging pull request due to conflicts
You try to merge a pull request but get this error: "Merge conflict in file.txt". What should you do next?
Attempts:
2 left
💡 Hint
Conflicts mean changes clash and need manual fixing.
✗ Incorrect
You must update the PR branch with the latest main branch, fix conflicts locally, then push the resolved code.
✅ Best Practice
expert3:00remaining
Ensuring accessibility in code review comments
Which practice best ensures accessibility when leaving code review comments on UI changes?
Attempts:
2 left
💡 Hint
Accessibility means making UI usable for everyone.
✗ Incorrect
Good code review includes checking UI accessibility features like color contrast, keyboard navigation, and ARIA labels.