Add a .gitattributes file#62
Closed
majcosta wants to merge 1 commit into1dot13:masterfrom
Closed
Conversation
e853a49 to
07a3196
Compare
... and make sure they stay that way. What this does is: * Ensure that every file checked into the repo uses LF line endings. Currently it's all over the place, including 2 files which had both CRLF and LF in them. People can still whichever they prefer when cloning the repo, just tweak core.autocrlf to their taste, e.g. usually 'true' on Windows and 'input' on Linux/macOS * Added an override so that Visual Studio files always use CRLF, just to be safe, VS certainly handles LF just fine for those files. Please don't review this line by line, it's just the .gitattributes file and once it's saved you run 'git add --renormalize .' to make all line endings in the repo consistent. If you want to do the same to the files in your working tree, run 'git rm --cached -r .' then 'git reset --hard' reference: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ and https://rehansaeed.com/gitattributes-best-practices/
07a3196 to
8379f5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... and make sure they stay that way.What this does is:
checked intoadded to the repo uses LF line endings. Currently it's all over the place,including 2 files which had both CRLF and LF in them. People can still choose whichever line endings they prefer when cloning the repo, just tweakcore.autocrlfto their taste, e.g. usuallytrueon Windows andinputon Linux/macOS* Added an override so that Visual Studio files always use CRLF, just to be safe, althoughVS handles LF just finefor those files.Please don't review this line by line, it'sjust the .gitattributes fileand once it's saved you run 'git add --renormalize .' to make all line endings in the repo consistent.If you want to do the same to the files in your working tree, run 'git rm --cached -r .' then 'git reset --hard'Edit: Manually fixed the two files that had both CRLF and LF line endings on them.
reference:
https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ and https://rehansaeed.com/gitattributes-best-practices/