修改了显示整个文件的Git diff命令,而不是显示了修改后的一小段代码
|
我正在使用git存储库。除了git diff命令,其他所有东西都正常工作。
每当我修改任何文件时,即使我修改了一小部分代码,显示整个文件的git diff命令也会被修改。
git diff显示修改的整个文件而不是一小部分代码的原因可能是什么?
也让我知道git diff配置的设置。
diff --git a/application/routes.php b/application/routes.php
index 2842f8d..6629d16 100755
--- a/application/routes.php
+++ b/application/routes.php @@ -1,671 +1,676 @@ -<?php -/** - * Set the routes. Each route must have a minimum of a name, a URI and a set of - * defaults for the URI. - / -?> +<?php +/* + * Set the routes. Each route must have a minimum of a name, a URI and a set of + * defaults for the URI. + */ +?>
没有找到相关结果
已邀请:
5 个回复
穗揣
和
的输出。空格可能是导致错误的原因。重排文本可能是另一种(您没有提到要存储的内容)。
遣莫捅炭
澜悍景哭苟
量华
锹缄
此命令基本上是使用\“ grep -v \”命令删除包含\“ diff \”,\“ index \”,\“ --- \”,\“ +++ \”,\“ @@ \”的行和-U0删除在修改的行的上方和下方显示的多余行。 对于只有一行更改的文件,请尝试此操作,您会更好地理解它:)