Bird
0
0

Given the following interactive rebase todo list:

medium📝 Command Output Q13 of 15
Git - Rebasing
Given the following interactive rebase todo list:
pick a1b2c3 Commit A
pick d4e5f6 Commit B
pick 789abc Commit C

If you change it to:
pick d4e5f6 Commit B
pick a1b2c3 Commit A
pick 789abc Commit C

What will be the order of commits after the rebase?
ACommit B, Commit A, Commit C
BCommit A, Commit B, Commit C
CCommit C, Commit B, Commit A
DCommit A, Commit C, Commit B
Step-by-Step Solution
Solution:
  1. Step 1: Understand the todo list order

    The interactive rebase applies commits in the order listed. Changing the order changes commit history order.
  2. Step 2: Apply the new order

    New order is Commit B, then Commit A, then Commit C.
  3. Final Answer:

    Commit B, Commit A, Commit C -> Option A
  4. Quick Check:

    Rebase applies commits in listed order [OK]
Quick Trick: Order commits in todo list to reorder history [OK]
Common Mistakes:
  • Assuming original order stays after rebase
  • Confusing commit hashes with order
  • Ignoring the todo list sequence

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes