Git · Junior · Question 58 of 75
Why can git pull create unexpected merge commits like "Merge branch 'main' of ..."?
- ✓Correct answer: By default pull merges when local and remote have both moved
- 2Pull always creates a merge commit, even with no changes
- 3The remote server adds these commits automatically
Explanation
If you committed locally and someone pushed meanwhile, the default pull merges them. git pull --rebase (or pull.rebase = true) replays your commits on top instead.