1

Sometimes for example I change a word in line 100 and delete last 4 lines. When I run "git diff" It shows a log which has a -(minus) and +(plus) before all lines whereas I changed only mentioned lines.
I thought it may be due to changing number of all lines but when I saw the changes again I didn't see any change to line numbers.

so what cause this?

Nick.h
  • 4,035
  • 5
  • 21
  • 22

2 Answers2

3

Which text editor are you using? Perhaps it changed line endings between Unix/DOS. (i.e. LF to CR+LF)

Donald
  • 1,718
  • 10
  • 18
0

That's just formatting to show what lines have been changed (added/removed/etc). Those +s and -s are not actually in your files.

Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130