Bird
0
0

Why does rebasing a public branch cause problems for collaborators?

hard📝 Conceptual Q10 of 15
Git - Rebasing
Why does rebasing a public branch cause problems for collaborators?
ABecause rebasing disables pushing to the remote repository
BBecause rebasing changes commit hashes, making histories diverge
CBecause rebasing merges all commits into one, losing details
DBecause rebasing deletes the branch from the remote repository
Step-by-Step Solution
Solution:
  1. Step 1: Understand what rebasing changes

    Rebasing rewrites commits creating new commit hashes, changing history.
  2. Step 2: Impact on collaborators

    Collaborators with old commits have different histories, causing conflicts and confusion.
  3. Final Answer:

    Because rebasing changes commit hashes, making histories diverge -> Option B
  4. Quick Check:

    Rebase changes commit hashes causing divergence [OK]
Quick Trick: Rebase rewrites commits, changing history hashes [OK]
Common Mistakes:
  • Thinking rebasing deletes branches
  • Assuming rebasing merges commits into one
  • Believing rebasing disables pushing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes