Bird
0
0

Given this interactive rebase todo list:

medium📝 Command Output Q4 of 15
Git - Rebasing
Given this interactive rebase todo list:
pick 111aaa Commit 1
pick 222bbb Commit 2
pick 333ccc Commit 3

If you change it to:
pick 333ccc Commit 3
pick 111aaa Commit 1
pick 222bbb Commit 2

What will be the new order of commits?
ACommit 2, Commit 3, Commit 1
BCommit 1, Commit 2, Commit 3
CCommit 3, Commit 1, Commit 2
DCommit 3, Commit 2, Commit 1
Step-by-Step Solution
Solution:
  1. Step 1: Understand the todo list order

    The commits are applied in the order listed in the todo file during rebase.
  2. Step 2: Read the changed order

    The new order is Commit 3 first, then Commit 1, then Commit 2.
  3. Final Answer:

    Commit 3, Commit 1, Commit 2 -> Option C
  4. Quick Check:

    Todo list order = new commit order [OK]
Quick Trick: Commit order follows todo list sequence in interactive rebase [OK]
Common Mistakes:
  • Assuming original order stays after reordering
  • Mixing 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