Bird
0
0

What is the main reason rebasing creates a linear history in Git?

easy📝 Conceptual Q11 of 15
Git - Rebasing
What is the main reason rebasing creates a linear history in Git?
AIt creates a new branch automatically
BIt merges all branches into one commit
CIt deletes all previous commits
DIt moves your commits on top of the latest commit from the target branch
Step-by-Step Solution
Solution:
  1. Step 1: Understand what rebasing does

    Rebasing takes your commits and places them on top of another branch's latest commit, replaying them in order.
  2. Step 2: Effect on commit history

    This action removes the branching structure by making your commits appear as if they were made after the latest commit on the target branch, creating a straight line.
  3. Final Answer:

    It moves your commits on top of the latest commit from the target branch -> Option D
  4. Quick Check:

    Rebase = replay commits on top [OK]
Quick Trick: Rebase replays commits on latest branch commit [OK]
Common Mistakes:
  • Thinking rebase merges commits into one
  • Believing rebase deletes old commits
  • Confusing rebase with branch creation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes