git diff,显示与删除和添加相同的行 [英] git diff, shows the same line as both deleted and added
本文介绍了git diff,显示与删除和添加相同的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我几乎完全恢复了原来的形式。在一个班级,我得到了以下差异,我无法理解。
index 4a9abb8..7c55879 100755
--- a / includes / site.inc.php
+++ b / includes / site.inc.php
@@ -142,11 +142,11 @@ class site {
public $ tplEngine ='smarty';
-
+
private $ _productsByType = array();
private $ logger;
- protected $ locale ='tr_TR';
-
+ protected $ locale ='tr_TR';
+
它说我删除并添加了相同的东西,原则上有没有与原始索引的区别,我不希望这个文件被视为已修改。
我该怎么办? Thx。
解决方案
检查空格。被替换的空看线在它们中间有空格。您也可能意外地用空格替换了标签,反之亦然。
I accidently worked on the master where I had to open up a new branch.
I reverted it to its original form almost completely. At one class I get the following diff that I can not make sense out of.
index 4a9abb8..7c55879 100755
--- a/includes/site.inc.php
+++ b/includes/site.inc.php
@@ -142,11 +142,11 @@ class site{
public $tplEngine = 'smarty';
-
+
private $_productsByType = array();
private $logger;
- protected $locale = 'tr_TR';
-
+ protected $locale = 'tr_TR';
+
It says that I have deleted and added the same thing, in principle there is no difference with the original index and I don't want this file to be seen as modified.
What should I do ? Thx.
解决方案
Check spaces. The replaced "empty" looking lines have spaces in them. You may also have accidentally replaced tabs with spaces or vice versa.
这篇关于git diff,显示与删除和添加相同的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文