Software Engineering · Question 30 · Hard
Why should you avoid rebasing commits that have already been pushed to a shared branch that others are using?
- Rebasing deletes the branch on the remote
- Rebasing rewrites those commits as new commits with new hashes, so collaborators' history diverges from the rewritten branch
- Rebasing silently discards every merge conflict
- Rebasing works only on the local main branch
Answer and explanation
Answer: B. Rebasing rewrites those commits as new commits with new hashes, so collaborators' history diverges from the rewritten branch
Explanation: git rebase replays commits on a new base, creating new commit objects. Anyone who built on the old commits will see a diverged history and must reconcile it, which can duplicate or lose work.
Previous: In mutation testing, 50 mutants are generated. 5 of them are equivalent…
Practise software engineering
Try a fresh set of software engineering questions with an explanation after every answer, free and without signing up: Software Engineering practice. Or sit a full placement mock test.
More software engineering questions
- What is the cyclomatic complexity of this procedure?
- Using Basic COCOMO in organic mode, Effort = 2.4 × (KLOC)^1.05 person-months…
- In mutation testing, 50 mutants are generated. 5 of them are equivalent…
More technical & programming practice
Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge