什么是插入& Git中的删除? [英] What are Insertions & Deletions in Git?
本文介绍了什么是插入& Git中的删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行git命令(如 git commit
或 git log --shortstat
)时,部分输出如下所示:
2个文件已更改,3个插入(+),11个删除( - )
插入或删除的含义是什么?
解决方案
只是插入的行数和在特定提交中删除的行数。请注意,修改后的行可能被视为插入和删除。
Git日志手册:
lockquote
- shortstat
只输出包含总
个修改文件数的--stat格式的最后一行作为添加和删除的
行的数量。
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?
解决方案
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.
这篇关于什么是插入& Git中的删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文