Bird
0
0

You ran 'git rebase -i HEAD~3' but accidentally deleted all lines in the editor. What happens next?

medium📝 Troubleshoot Q7 of 15
Git - Rebasing
You ran 'git rebase -i HEAD~3' but accidentally deleted all lines in the editor. What happens next?
AAll three commits are squashed automatically
BGit creates a new empty commit
CThe rebase aborts with no changes applied
DThe rebase continues without changes
Step-by-Step Solution
Solution:
  1. Step 1: Understand effect of deleting all lines in rebase editor

    Deleting all lines means no commits are picked, so Git aborts the rebase.
  2. Step 2: Check options

    Only The rebase aborts with no changes applied correctly describes this behavior; others are incorrect.
  3. Final Answer:

    The rebase aborts with no changes applied -> Option C
  4. Quick Check:

    Empty rebase list = abort rebase [OK]
Quick Trick: Empty rebase list aborts the rebase [OK]
Common Mistakes:
  • Expecting automatic squash
  • Thinking new commit is created
  • Assuming rebase continues unchanged

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes