1

Example from terminal

for example:

27 ++++--

what does 27, 4'+', and 2'-' mean?

hi, thanks, but i want to know why its 4x + and 1x - (++++-) not 8x + and 2x -(++++++++--) sometimes i see ++-- why it is not +- (50%:50%),?

1 Answers1

2

In git a + means an addition and - means a deletion.

In the image you've attached 25 ++++-; there were a total of 25 changes of which (approximately)4xwas addition of lines and 1x was removal of line(s). Here x = 5
And in the next line 14 ++- There were around 2x addition of lines and 1x deletion of line(s).

Here's a git diff for better understanding:

diff --git a/Src/Device_Config.c b/Src/Device_Config.c
index 05116f6..b177430 100644
--- a/Src/Device_Config.c
+++ b/Src/Device_Config.c
@@ -6,7 +6,7 @@

 #include "Device_Config.h"
-#include "userInterface.h"
+#include "UserInterface.h"
 #include "wifi.h"
 #include "Log.h"
 #include "Timezones.h"

As you can see one line was deleted and one line was added.

clamentjohn
  • 3,417
  • 2
  • 18
  • 42
  • hi, thanks, but i want to know why its 4x + and 1x - (++++-) not 8x + and 2x -(++++++++--) sometimes i see ++-- why it is not +- (50%:50%),? –  Sep 11 '18 at 14:02
  • @huhao it's the ratio of added and removed lines. Have a look at the SO question this is a duplicate of. – clamentjohn Sep 11 '18 at 14:56
  • thank you, i think i've got it –  Sep 12 '18 at 09:20