Bird
0
0

Given this interactive rebase todo list:

medium📝 Command Output Q4 of 15
Git - Rebasing
Given this interactive rebase todo list:
pick a1b2c3 Commit A
squash d4e5f6 Commit B
pick f7g8h9 Commit C

What will happen to Commit B after the rebase?
ACommit B will be edited for changes
BCommit B will be deleted
CCommit B will be combined into Commit A
DCommit B will be kept as a separate commit
Step-by-Step Solution
Solution:
  1. Step 1: Understand 'squash' in rebase todo

    'squash' means combine this commit into the previous one, merging their changes and messages.
  2. Step 2: Apply to Commit B

    Commit B will merge into Commit A, so Commit B won't appear separately.
  3. Final Answer:

    Commit B will be combined into Commit A -> Option C
  4. Quick Check:

    squash = combine commit into previous [OK]
Quick Trick: 'squash' merges commit into previous one [OK]
Common Mistakes:
  • Thinking squash deletes commit
  • Assuming squash keeps commit separate
  • Confusing squash with edit

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes