Challenge - 5 Problems
Rebase Recovery Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Output of git reflog after a bad rebase
You performed a rebase that caused conflicts and you want to see the previous HEAD states to recover. What will be the output of
git reflog immediately after the bad rebase?Git
git reflogAttempts:
2 left
💡 Hint
Think about what reflog tracks in Git.
✗ Incorrect
Git reflog records all movements of HEAD including rebases, so it shows previous states allowing recovery.
🔀 Workflow
intermediate2:00remaining
Steps to abort a bad rebase safely
You started a rebase but realize it is causing too many conflicts. Which sequence of commands correctly aborts the rebase and returns your branch to the state before the rebase?
Attempts:
2 left
💡 Hint
You need to check status before aborting and verify after abort.
✗ Incorrect
Checking status first shows rebase in progress, then abort cancels it, checkout ensures branch, and log verifies history.
❓ Troubleshoot
advanced1:30remaining
Recovering lost commits after a failed rebase
After a rebase gone wrong, some commits seem lost from your branch history. Which command helps you find and recover those lost commits?
Attempts:
2 left
💡 Hint
Think about where Git tracks all recent HEAD movements.
✗ Incorrect
Git reflog records all recent HEAD positions, allowing you to find lost commits after a bad rebase.
✅ Best Practice
advanced1:30remaining
Best practice to avoid losing work during rebase
Which practice best helps prevent losing commits during a complex rebase?
Attempts:
2 left
💡 Hint
Think about how to save your current work safely before risky operations.
✗ Incorrect
Creating a backup branch preserves your current state so you can recover if rebase goes wrong.
🧠 Conceptual
expert1:30remaining
Understanding the effect of git rebase --continue after conflict resolution
After resolving conflicts during a rebase, what does
git rebase --continue do?Attempts:
2 left
💡 Hint
Think about how rebase processes commits one by one.
✗ Incorrect
After resolving conflicts, 'git rebase --continue' applies the next commit and moves the rebase forward.