diff --git a/.gitattributes b/.gitattributes index 4282322a..640e8d08 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,40 @@ +# https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings +# https://git-scm.com/docs/gitattributes +# https://git-scm.com/docs/git-config +# https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ + +# Configure this repository to use Git's type detection algorithm to guess +# whether a file is text or binary. Text files will have line endings converted +# as if you had set +# eol=native +# That is, on Windows text files will have CRLF line endings in your working +# directory while on Linux and macOS your text files will have LF line endings +# in your working directory. In either case, they will have LF line endings in +# the Git repository itself. + # Set the default behavior, in case people don't have core.autocrlf set. -* text eol=lf +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. Git would likely get these right, but +# we can be sure by adding them here. +*.ino text diff=cpp +*.c text diff=c +*.cc text diff=cpp +*.cxx text diff=cpp +*.cpp text diff=cpp +*.c++ text diff=cpp +*.hpp text diff=cpp +*.h text diff=c +*.h++ text diff=cpp +*.hh text diff=cpp + +*.md text +*.yaml text +*.yml text + + +# Denote all files that are truly binary and should not be modified. +# Even if we don't have any of these, they make a good example. +*.png binary +*.jpg binary diff --git a/CHANGELOG.md b/CHANGELOG.md index 74df5b83..8f73dd8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Change 266 files from CRLF to LF. +- Update .gitattributes so we have consistent line endings - Run tests on push as well as on a pull request so developers can see impact ### Deprecated