Merge Conflicts
Question
Can there be any problems while merging changes with other developers?
Short interview answer
Yes. A conflict occurs when Git cannot automatically combine overlapping changes. Developers must inspect the intended result, edit it, test it, mark the conflict resolved, and then complete or abort the merge or rebase.
Detailed answer
If two developers change the same lines of InvoiceCalculator, Git may not know which version represents the required behavior. Conflict markers show the competing changes, but they are not a solution: someone who understands the feature must produce the correct combined code. Build and test after resolution, because a textually resolved conflict can still be behaviorally wrong. Small focused commits, early communication about overlapping work, and integrating upstream changes regularly reduce the size and surprise of conflicts; they cannot eliminate genuine semantic disagreements.