What Happens Behind the Scenes When You Click “Merge”?

Most developers use “merge” daily. Few actually understand what Git is doing under the hood.