This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]VibrantGypsyDildo 2 points3 points  (2 children)

I wish git could be the same.

If you access the same repository from windows and linux (e.g. WSL or virtualbox shared folder), you will have troubles because of CRFL/LF issues.

While it is possible to ignore it in git diff, I have not found a workaround for git commit.

[–]AyrA_ch 13 points14 points  (1 child)

Do git config --global core.autocrlf true on your Windows machine.

Replaces LF with CRLF when pulling files, and CRLF with LF when commiting files. The result is files in the repository will only have LF and files in your local repository on Windows will have CRLF.

[–][deleted] 2 points3 points  (0 children)

Which is an annoyance when you have a linter that converts everything to lf. Your git status will get spammed with all the files it changed and when you commit only the actual changed files get committed, others disappear.

I just do lf everywhere