TortoiseGit, ignore line endings

2019-07-26 14:08发布

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.

标签: tortoisegit
2条回答
ら.Afraid
2楼-- · 2019-07-26 14:21

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.

查看更多
Emotional °昔
3楼-- · 2019-07-26 14:32
  1. Right click in that repository, TortoiseGit -> Settings
  2. Turn local AutoCrlf OFF and apply the setting enter image description here

Extra ref.

Read Dealing with line endings - Per-repository settings,

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

查看更多
登录 后发表回答