Git: [Suggestion] Checkout as-is, commit as-is to default

Created on 25 Jan 2021  路  3Comments  路  Source: git-for-windows/git

image

If there no reason to do something, just keep it!

The Windows Setup recommended line ending conversions is "Checkout Windows-style, commit Unit-style line endings", It's not a good idea, it's often broken the resource files, like .xml/.json etc. and make newb feel strange in out team.

actually, the IDE such as IDEA can do convert as well, because there has syntax parsing, it known which is the code file, but git sample process anything as a text file without syntax.

Ability to chain program together to perform complex tasks.
Write programs that do one thing and do it well.

question

Most helpful comment

No, the key is "backwards compatibility".

All 3 comments

The key is the "Cross-Platform" expectation.

Maybe the wording could be adjusted/improved so that it's more obvious (PRs always welcomed, but note that the explanatory message is limited to 3 lines for reasons).

Maybe include some note/comment about using the .gitattributes file use for the resource/xml/json files.

No, the key is "backwards compatibility".

I think that "cross-platform compatibility" actually dictates that we need to keep the current default. Otherwise, you _ask_ for mismatching line endings to be checked in.

In any case, I consider https://www.edwardthomson.com/blog/git_for_windows_line_endings.html to speak the truth. The question is not about core.autoCRLF but about the appropriate eol attributes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drewnoakes picture drewnoakes  路  5Comments

jesterKing picture jesterKing  路  3Comments

sschlesier picture sschlesier  路  3Comments

daxelrod picture daxelrod  路  4Comments

dlk-pavan picture dlk-pavan  路  4Comments