github文件显示不全
黄舟
黄舟 2017-04-21 11:18:16
0
0
643

github仓库里面有的文件显示不全,具体看这里,在编辑文件时就能看到全部内容

看了stackoverflow上类似的问题:Full file not displaying on GitHub?,然后又看了Dealing with line endings,还是没有解决。

望解答!!!

------------------------------------------------------------------------------------------------------------------------

将.vimrc的fileformat改为dos,重新提交push结果就全部显示了,这个是为什么?fileformat为unix时为什么显示不全呢。

之前配置了git config --global core.autocrlf true,不知道和这个有关没?如何让github正常显示所有unix文件呢。

-----------------------------------------------------------------------------------------------------------------------
又静下心来看了Dealing with line endings,觉得问题清晰了很多。github应该会自己决定如何使用换行符,不过要跨平台的话,windows下最好设置以下属性:git config --global core.autocrlf true ,这样win下的文件commit时自动把\r\n变为\n,而在fetch时自动变为\n又变回\r\n。linux下设置git config --global core.autocrlf input, 然后linux一些fileformat为dos的文件commit时换行符就会自动变回lf。这样理解对不对啊?大家有没有要补充更正的?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!