Skip to content

Commit c3ab80c

Browse files
committed
chore: add .gitattributes for consistent line endings and file handling
Configured .gitattributes to normalize text files with LF endings, handle binary files safely, and improve diff/merge behavior across platforms. Also ensures accurate language detection and cleaner repository exports. Signed-off-by: https://github.com/Someshdiwan <[email protected]>
1 parent 4140195 commit c3ab80c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.gitattributes

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
*.c text eol=lf
3131
*.cpp text eol=lf
3232
*.h text eol=lf
33+
*.hpp text eol=lf
3334

3435
# ------------------------------------------------------------------------------
3536
# Binary files (never touch line endings / no diffs)
@@ -71,7 +72,7 @@
7172
*.yaml text
7273
*.sql text
7374

74-
# Lockfiles rarely need diffs
75+
# Lockfile rarely need diffs
7576
package-lock.json -diff
7677
yarn.lock -diff
7778
pnpm-lock.yaml -diff
@@ -118,6 +119,12 @@ pnpm-lock.yaml -diff
118119
*.md linguist-detectable=true linguist-language=Markdown
119120
*.txt linguist-detectable=true
120121

122+
# C / C++ visibility and language classification
123+
*.c linguist-detectable=true linguist-language=C
124+
*.h linguist-detectable=true linguist-language=C
125+
*.cpp linguist-detectable=true linguist-language=C++
126+
*.hpp linguist-detectable=true linguist-language=C++
127+
121128
# Force correct language classification
122129
*.xml linguist-language=XML
123130
*.json linguist-language=JSON

0 commit comments

Comments
 (0)