Git · Junior · Question 21 of 75
When does Git create a merge commit?
- 1Only when there were conflicts to resolve
- ✓Correct answer: When both branches have new commits since they diverged
- 3Every time you run
git merge, without exception
Explanation
With divergent histories Git combines them in a commit with two parents. Conflicts or not, that commit is needed; with a linear history a fast-forward is enough.