Git 中的插入和删除是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9013786/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are Insertions & Deletions in Git?
提问by bendytree
When I run git commands like git commit
or git log --shortstat
part of the output looks like:
当我运行 git 命令时,git commit
或git log --shortstat
部分输出如下所示:
2 files changed, 3 insertions(+), 11 deletions(-)
What is the meaning of an insertionor a deletion?
插入或删除是什么意思?
回答by manojlds
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:
Git日志手册:
--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.
--shortstat
仅输出 --stat 格式的最后一行,其中包含修改文件的总数,以及添加和删除的行数。