Challenge - 5 Problems
PR Feedback Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this git command after updating a PR branch?
You have a branch named
feature checked out. You run git pull origin feature after pushing changes to update your local branch. What will this command output if your local branch is already up to date?Git
git pull origin featureAttempts:
2 left
💡 Hint
Think about what git says when no new changes are fetched or merged.
✗ Incorrect
When your local branch matches the remote branch,
git pull reports 'Already up to date.' because there is nothing new to merge.🔀 Workflow
intermediate2:00remaining
Which git workflow step correctly updates a PR branch after feedback?
You received feedback on your pull request and made changes locally on your
feature branch. What is the correct sequence to update the remote PR branch with your new commits?Attempts:
2 left
💡 Hint
Remember the order: stage changes, commit, then push.
✗ Incorrect
You must first stage changes with
git add, then commit them, and finally push to update the PR branch.❓ Troubleshoot
advanced1:30remaining
What error occurs if you try to push to a PR branch without committing changes?
You modified files locally but forgot to commit. You run
git push origin feature. What error will git show?Attempts:
2 left
💡 Hint
Think about what git pushes when no new commits exist.
✗ Incorrect
If you have uncommitted changes, git push will not push them. It will say 'Everything up-to-date' because no new commits exist to push.
🧠 Conceptual
advanced2:00remaining
What is the best practice to keep your PR branch updated with the main branch before pushing changes?
You want to update your PR branch
feature with the latest changes from main before pushing your fixes. Which command sequence is best?Attempts:
2 left
💡 Hint
You want to update main first, then merge it into your feature branch.
✗ Incorrect
First update your local main branch, then switch to your feature branch and merge main into it to get the latest changes.
✅ Best Practice
expert2:30remaining
Which git command safely updates a PR branch by replaying your commits on top of the latest main branch?
You want to update your PR branch
feature with the latest main branch changes, keeping a clean history by replaying your commits. Which command do you use?Attempts:
2 left
💡 Hint
Rebasing replays commits on top of another branch.
✗ Incorrect
Using
git rebase main moves your commits to the tip of main, creating a linear history.