Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are Insertions & Deletions in Git?

Tags:

git

When I run git commands like git commit or git log --shortstat part of the output looks like:

2 files changed, 3 insertions(+), 11 deletions(-) 

What is the meaning of an insertion or a deletion?

like image 458
bendytree Avatar asked Jan 26 '12 04:01

bendytree


1 Answers

It is just number of lines inserted and number of lines deleted in that particular commit. Note that a modified line maybe treated as an insert and a delete.

Git log manual:

--shortstat

Output only the last line of the --stat format containing total number of modified files, as well as number of added and deleted lines.

like image 161
manojlds Avatar answered Sep 18 '22 23:09

manojlds