Bird
0
0

Why does rebasing create a cleaner project history compared to merging?

hard📝 Conceptual Q10 of 15
Git - Rebasing
Why does rebasing create a cleaner project history compared to merging?
ABecause it deletes all old commits permanently
BBecause it creates multiple parallel branches for each feature
CBecause it avoids extra merge commits and shows a straight line of changes
DBecause it automatically resolves all conflicts
Step-by-Step Solution
Solution:
  1. Step 1: Understand merge commit effect

    Merging creates extra commits to combine branches, which can clutter history.
  2. Step 2: Understand rebase effect

    Rebasing rewrites commits on top of base branch, avoiding merge commits and making history linear.
  3. Final Answer:

    Because it avoids extra merge commits and shows a straight line of changes -> Option C
  4. Quick Check:

    Rebase creates cleaner history [OK]
Quick Trick: Rebase avoids merge commits, making history linear and clean [OK]
Common Mistakes:
  • Thinking rebasing deletes commits
  • Believing it creates parallel branches
  • Assuming it auto-resolves conflicts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes