Is your feature request related to a problem? Please describe.
Although line endings are mostly a solved problem in Git, the require a client respect or use defaults for line endings. This means that when authors are working on different platforms and have not setup their own git "correctly", the line endings get confused. The next time someone else edits the file on the web or on another os, the diff will show up as the entire file.
Describe the solution you'd like
Add a simple .gitattributes file to the repo and normalize the line endings in the repos. https://github.com/MicrosoftDocs/vsts-docs/pull/554 has an example of what needs to be done in terms of the gitattributes file, and the link to the SO instructions on normalizing a repo.
Describe alternatives you've considered
EditorConfig can also try and enforce/override the line ending setting, but since that is at the plug-in level, it assumes that the user has the plugin installed. Doing it at the source control level ensures it requires no user setup to enforce.
Additional context
There are also whitespace setting in this file, but those might be better handled by an EditorConfig file
@nschonni Thanks for your suggestion. I will bring it to team to see if we implement it.
馃殌 ATTENTION: Internal request logged.
Another example PR: https://github.com/MicrosoftDocs/vsts-docs/pull/577
Thanks @spottedmahn and @nschonni - we are looking at how this can be done at scale!
we have added this feature to NEW repos generated by OPS
we have added this feature to NEW repos generated by OPS
What about existing repos? As an editor of VSTS docs or ASP.NET Core docs will I still have this problem until they take action?
I have announced this to repo owners and will allow them to choose to include this new file... I do not want to push this into the repo's that are established
馃憤 that's great. It would be nice to send instructions to the existing repos about fixing up the issues because it does cause merge conflicts on PRs when an entire file gets marked as a diff because of encoding issues 馃槈
Contents of the default .gitattributes file:
.gitattributes
```
*.c text
*.h text
*.sln text eol=crlf
*.png binary
*.jpg binary
```
Most helpful comment
Contents of the default .gitattributes file:
.gitattributes
```
Set the default behavior, in case people don't have core.autocrlf set.
Explicitly declare text files you want to always be normalized and converted
to native line endings on checkout.
*.c text
*.h text
Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
```