Skip to content

Commit 4f0430e

Browse files
committed
Add .gitattributes to enforce LF line endings and binary file handling
- Created .gitattributes file to normalize line endings for text files to LF on commit. - Specified LF line endings for Go source files, shell scripts, and marked certain file types as binary.
1 parent 245acb5 commit 4f0430e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Normalize all text files to LF on commit.
2+
* text=auto eol=lf
3+
4+
# Ensure Go source is always LF (gofmt requirement).
5+
*.go text eol=lf
6+
*.mod text eol=lf
7+
*.sum text eol=lf
8+
9+
# Keep shell scripts LF.
10+
*.sh text eol=lf
11+
12+
# Mark binaries as binary.
13+
*.exe binary
14+
*.png binary
15+
*.jpg binary
16+
*.gif binary

0 commit comments

Comments
 (0)