Understanding git diff on files [duplicate]

心不动则不痛 提交于 2020-01-11 07:55:11

问题


What does the folowing output of git diff mean?

diff --git a/README.md b/README.md
index 24aa464..49c20f4 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,2 @@
 LINE1
-LINE2
 LINE3

I think I understand that the "-" new LINE2 means that the version on have in workspace does not have the LINE2 that is in staging, but what does @@ -1,3 +1,2 @@ mean??


回答1:


It is the line ranges that the diff is concerned with for that hunk, meaning lines 1 to 3 in a/README.md and lines 1 to 2 in b/README.md.



来源:https://stackoverflow.com/questions/14896469/understanding-git-diff-on-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!