gitgithubmergediffstat

Git Merge: What do the pluses mean?


I ran "git merge" from Terminal on Mac OS X to merge a branch into my master and receive output that looks like:

 spec/models/user_spec.rb    57 ++++++++++++++++++++

What does the "57 ++++++++++++++++++++" mean? Is that how many times I inserted/modified that file? What are all the plusses for?


Solution

  • 57 lines changed. The pluses are graphical indications of the number of lines changed, kind of like a bar chart. They make more sense when you have changed several files, as they give a quick way to see the relative amount of lines changed per file.

    I've found that if you only make a few changes, each plus corresponds to one line. As you make more, it scales them back.

    It also shows minuses for line deletions.

    If you made 28 (57/2) line changes in another file, you would see a string of pluses half as long next to it.