Comments on merge commits

Continuing the discussion from Testers wanted: perspective mode (early stages):

bleke@Nemesis:~/dev/mypaint$ git merge gwojcik/perspectiveMode

Here I’m asked to enter the reason why I want to merge. Does everybody have to do this? That request didn’t show up the first time I tried to compile the perspective mode branch.

Yes. If you are asked, it’s because the branches have diverged, meaning that there is more than one commit along each branch:

>>---o-----o------o-----o              (your branch)
       o------o------o------o          (their branch)

Merging then makes a “merge commit” containing the code from both branches merged together, plus any little fixes needed to make it all work.

>>---o-----o------o-----o-----o---->>   (your branch + their branch)
      \                      /
       o------o------o------o           (their branch)

The reason you are asked for a comment is because every commit needs explaining, not just merge commits.


Ok, I was a little worried that I was merging my branch with their branch (uploading my branch to the git servers).

Git isolates that stuff pretty carefully. If you haven’t git push ed, and nobody has git pull (or git fetch) ed from you, there is basically zero chance of a merge occurring. Almost all operations are 100% local.

That’s good to know.