Lineendings (was Everything good about Python except GUI IDE?)

Chris Angelico rosuav at gmail.com
Sun Feb 28 20:49:57 EST 2016


On Mon, Feb 29, 2016 at 12:39 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> Unfortunately that's the outlook all major VCSes (not just git) have started
> with and its wrong.
> Speaking somewhat simplistically:
> On windows one should see CRLF
> On *nix LF
> And this SHOULD NOT be a diff!
> [Assuming the VCS is serious about collaboration]
>

If you want this, simply run this on your Windows computer:

git config --global core.autocrlf true

Job done. The repo will record LF, but you'll get CRLF on the Windows
box. Alternatively, if you're happy with LF on Windows, but want
protection against accidentally checking in a CRLF:

git config --global core.autocrlf input

Either way, this means that line endings get folded to LF for consistency.

ChrisA


More information about the Python-list mailing list