Skip to content

Generate gitattributes file #1569

Closed
Closed
@xenoterracide

Description

@xenoterracide

it's annoying when I create a new project, the first thing I have to do is copy my .gitattributes from somewhere else lest something be committed incorrectly (like line ending fixes to lf in a .bat. autocrlf isn't really the recommended way to go these days. The best way is gitattributes. This is a good enough default for .gitattributes since these are the extensions/files that will get generated. I'm not certain if you generate with mvnw if you do then you will need to update for that.

* text=auto eol=lf
*.sh text eol=lf
*.bat text eol=crlf
*.jar -text
/gradlew text eol=lf

bat, cmd, ps will not work with lf line endings, any variant of an sh will not work with crlf, even on a windows bash (last time I tried) that's why this should be done.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions