I have a git repo in my Dropbox, that syncs between a Linux and a windows machine. I work on both machines on text files (.cpp
on linux and win, .tex
/.txt
on win). So, my editors and programs both write CRLF (the win programs) and LF (the linux programs) files, all programs understand all variants on reading.
I would like to tell git to correct everything to LF
(I like it that way best). On both platforms.
Alas with all my tries of core.autocrlf
=true/false/input
and core.eol
=lf
I get all kinds of messages. "Will convert from LF to CRLF", "all files have changed" and so on. Currently I have
core.eol=lf
core.autocrlf=input
and I am on my windows machine.
When tomorrow everything is synced to my Linux machine, what will I see?
I hope I finally understood everything, but I am really not sure. input
? Sounds strange...
It used to be that you had to have autocrlf set to true and that would do it. Currently, you should have it set to input. Then depending whether you are in linux or windows you set the eol setting differently.
To double check your settings a diff will show crlfs in the repository.
Also, edit the files with vim -b, this will show the line endings too.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With