Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
忽略行尾空白的GIT全局配置_Git_Whitespace_End Of Line - Fatal编程技术网

忽略行尾空白的GIT全局配置

忽略行尾空白的GIT全局配置,git,whitespace,end-of-line,Git,Whitespace,End Of Line,即使我没有更改其中一个文件中的任何内容,我也会使用git status在modified files列表中获得一个文件 当我看到该文件使用的是>git diff时,它显示所有行都被删除,所有行(相同)都被添加,但当我使用>git diff——忽略空间更改时,git没有显示任何更改 我确信这与行尾相关,但奇怪的是我没有在所有文件中看到这种行为。。!而且,所有开发人员都在使用Windows 现在,我想以某种方式告诉Git,以使它不会考虑结束行空白> ,而我做 git拉或 git diff > /p>

即使我没有更改其中一个文件中的任何内容,我也会使用git status在modified files列表中获得一个文件

当我看到该文件使用的是
>git diff
时,它显示所有行都被删除,所有行(相同)都被添加,但当我使用
>git diff——忽略空间更改时,git没有显示任何更改

我确信这与
行尾相关,但奇怪的是我没有在所有文件中看到这种行为。。!而且,所有开发人员都在使用Windows

现在,我想以某种方式告诉Git,以使它不会考虑<代码>结束行空白> <代码>,而我做<代码> git拉或<代码> git diff > /p> 我的Git属性

# Auto detect text files and perform LF normalization
* text=auto
我的Git配置

core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=XXX
user.email=XXX@gmail.com
core.autocrlf=true
core.crlf=true
colors.ui=true
auto.crlf=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
core.crlf=true

请帮助我。

首先确保
core.autocrlf
设置为false,并查看新克隆后问题是否仍然存在。首先将其设置为false,我从web获得了一些建议,最后尝试了
true
:(然后尝试删除.gittribute text auto指令,再次克隆并查看问题是否持续谢谢您的时间和建议,我已尝试更改这些设置,最终结果是随机的。)我已使用相同的配置克隆了两次repo,第一次是显示有差异的文件,第二次是正常的!:(真奇怪,这不应该是随机的。