我该怎么做
git status
忽略行尾差异?
背景信息:
我随机使用 Windows 和 Linux 来处理这个项目。该项目在 Dropbox 中。
我发现了很多关于如何让 git diff 忽略行尾的信息。由于我使用 meld git diff 为每个文件打开 meld。并且融合说“相同的文件”。
那么我该如何避免这种情况。 Git 应该只为更改的文件打开 meld。 如果只有文件结尾不同,git status 不应报告文件已更改。
编辑:原因:
这是由于 Windows 上的此设置而发生的
core.autocrlf true
所以我检查了 Linux 上的工作副本并在 Windows 上将 core.autocrlf 设置为 false。
如果知道如何让 git status 忽略不同的换行符还是很不错的。
最佳答案
尝试像这样设置 core.autocrlf 值:
git config --global core.autocrlf true
关于linux - Git 状态忽略行尾/相同文件/windows & linux 环境/dropbox/meld,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20496084/