TortoiseGit, ignore line endings

耗尽温柔 提交于 2020-01-15 03:05:13

问题


I am looking for a way to prevent TortoiseGit from flagging files as changed when they have Unix line endings. It is just tough to check if remote files have changed when you FTP download a folder, they show up as changed often because of the LF version that comes down. I'm on Windows, the repos are CRLF, but as I said when they change on the server they end up as LF.


回答1:


  1. Right click in that repository, TortoiseGit -> Settings
  2. Turn local AutoCrlf OFF and apply the setting

Extra ref.

Read Dealing with line endings - Per-repository settings,

then try Dealing with line endings - Refreshing a repository after changing line endings




回答2:


In my case all local files was showing change in newline chars. When I looked closely the 'CRLF' was converted to 'LF'. If I change the LF to CRLF manually, it was not working as in GIT repo it was showing it as difference in file. I also tried Yue's changes but while clicking on Apply button it was asking me windows hook file, that I do not had.

Then i realized that recently I had installed "cygwin" on my system. I was done using that, so I removed it and restarted system, and all my problems gone. My answer may help someone in my situation.



来源:https://stackoverflow.com/questions/44852951/tortoisegit-ignore-line-endings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!