Git: what does the number of +/- signs in diff / merge output mean?

Possible Duplicate:
Git Merge: What does this mean?
Git diff –stat explanation

Sorry for the stupid question, but i can’t find a clear answer anywhere.

  • Git diff for added file
  • Getting Git GUI to Ignore Space Changes in its diff View
  • How to use an external diff tool for Git in Visual Studio 2013?
  • Git diffing crashes on Windows when submodules exist
  • Search git branches for file in common
  • How can I get a unified git diff in Visual Studio Code?
  • When you merge two branches in git, you get an output like that :

     some_file.txt  |  564 ++++++++++++++--

    I undestand that + and - mean addition and deletion, but :

    • what does the number of signs represent ?
      when you have few changes, each sign seem to represent a line, but when you have more signs, i can’t get the logic of the representation

    • is it some sort of percentage of changes ? My guess is that the number of signs represents a relative amount of changes – but relative to what ? current file ? the whole merge ?

    • how is it calculated ? Is there any official source about this ? The most accurate answer i had on this by now is “this representation is not very precise”… i’m just curious

  • How can I connect to my own Git server in SourceTree?
  • Branch keeps tracking master
  • How do i clone my filesystem on the dyno i'm using?
  • How to stash my previous commit?
  • Get git status boolean without slow list of diff
  • Can I use `git subtree split` to maintain a “fork” of a project's subdirectory?
  • One Solution collect form web for “Git: what does the number of +/- signs in diff / merge output mean?”

    It supposed to reflect the amount of changes (in lines) of each file listed.
    Plus signs for additions, minuses for deletions.

    the 564 gives the amount of changed lines, and the / + gives you the proportion of deletions/additions.
    When the amount of changes can fit a line you’ll get ‘+‘ per addition, ‘‘ per deletion;
    Otherwise, this is an approximation, e.g.

    CHANGES.txt     |   47 +++++++++++++++++++++++++++++++++ |   77 +++++++++++++++++++++++++++++++++++++++----------------
    2 files changed, 102 insertions(+), 22 deletions(-)

    On CHANGES.txt since you can see that there are no ‘‘, and since 47 ‘+‘ are a lot you have a proportionate amount of them (i.e. 100%).
    On you’ll see x39+‘ standing for 55 additions and x16‘ standing for 22 deletions.
    Exactly as their proportion, and just the amount to fit output screen.

    Hope that helps.

    Git Baby is a git and github fan, let's start git clone.