Skip to content

Commit

Permalink
main: Add .gitattributes
Browse files Browse the repository at this point in the history
This change ensures that devs using Windows:
1. will avoid accidentally pushing modified files with CRLF line endings
(i.e. this repo will maintain a consistent use of LF line endings)
2. won't see files as modified in git due to line ending changes
3. can still use CRLF in their working trees.

This file explicitly declares the files which should be treated like
text, which means that git won't incorrectly try to modify line endings
on a binary file.
  • Loading branch information
matthawkins90 authored and davecgh committed Jun 8, 2024
1 parent 987239f commit 5619a06
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Normalize line endings of text files to LF regardless of OS or git settings
*.conf text
*.dockerignore text
.gitattributes text
.gitignore text
*.go text
*.gv text
*.json text
*.md text
*.mediawiki text
*.mod text
*.py text
*.service text
*.sh text
*.sum text
*.svg text
*.xml text
*.yml text

0 comments on commit 5619a06

Please sign in to comment.