What do two plus signs in a git diff mean?

前端 未结 2 1467
抹茶落季
抹茶落季 2020-12-31 02:23

I am doing a git diff and for the first time, I am seeing double plus-signs next to lines.

++        if ($field_name == $selected) {
++
++              


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-31 02:57

    The ++ in diff output is from a "combined diff", which is the default format for git diff when showing merges (or when using the -c, -cc or -m options)

    When viewing a combined diff, if the two files you're comparing have a line that's different from what they were merged into, you will see the ++ to represent:

    one line that was added does not appear in either file1 or file2

提交回复
热议问题