【发布时间】:2016-08-04 12:46:51
【问题描述】:
问题:这是真正的Code Difference & 在我在 github 的提交中显示@@ -1,202 +1,251 @@,因为该文件已被完全替换。我想看看 github 中代码的不同,如下图所示。
系统信息:我在 windows 8.1 中使用 sublime text 2 和 windows 7 中使用 phpdesigner 7 编辑我的代码
解决方案,我在提交之前尝试过:
- 将编辑器中的行格式设置更改为 windows/unix/macOSx
- 在我的 .gitattribute 中添加了
* text=auto - 我也试过
dos2unix&unix2dos命令 - 奇怪的是,如果我使用 vi 编辑,它可以工作。但是,我不习惯使用它。
我的 .gitattribute :
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
谢谢。
【问题讨论】:
-
我将删除我的答案,因为它不符合您在我们的对话中指定的问题,也许这个答案可以help
-
@e.doroskevic 感谢您调查我的问题。由于我不想让其他专家误解,我可以请求您编辑我的问题以解决任何模糊问题吗?
-
@Arf 这是一个高度赞扬。我很感激,尽管我远非如此。我不完全理解这个问题,我可能推测并说你想要
git diff所做的事情之间的一些东西,但也包括行号。或许,添加一个您想要查看的简单输出示例。这应该可以帮助其他人帮助您 -
@e.doroskevic 感谢您的建议。我已经添加了一张图片。
标签: git github sublimetext2 core.autocrlf phpdesigner