View Revisions: Issue #6975

Summary 0006975: Set up gitattributes for Git consistently update line endings for Windows and other file systems
Revision 2025-06-24 14:29 by pbelov
Additional Information Draft proposal of the .gitattributes file:

# The gitattributes instructs GIT how to handle line endings automatically for various file types
* text=auto

#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.gitattributes text
.gitignore text
*.md text diff=markdown


# Java sources
*.java text diff=java
*.kt text diff=kotlin
*.groovy text diff=java
*.scala text diff=java
*.gradle text diff=java
*.gradle.kts text diff=kotlin

# These files are text and should be normalized (Convert crlf => lf)
*.css text diff=css
*.scss text diff=css
*.sass text
*.df text
*.htm text diff=html
*.html text diff=html
*.js text
*.mjs text
*.cjs text
*.jsp text
*.jspf text
*.jspx text
*.properties text
*.tld text
*.tag text
*.tagx text
*.xml text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.jar binary
*.so binary
*.war binary
*.jks binary

# Common build-tool wrapper scripts ('.cmd' versions are handled by 'Common.gitattributes')
mvnw text eol=lf
gradlew text eol=lf

# These are explicitly windows files and should use crlf
*.bat text eol=crlf
Revision 2025-06-24 14:01 by pbelov
Additional Information Draft proposal of the .gitattributes file: