Skip to content

Commit

Permalink
Force line ending type for specific files
Browse files Browse the repository at this point in the history
Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.

Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
  • Loading branch information
ecsv committed Dec 19, 2013
1 parent 811a1f0 commit 6bf363d
Show file tree
Hide file tree
Showing 3 changed files with 375 additions and 337 deletions.
38 changes: 38 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
* text=auto

# normal text files
*.6 text
AUTHORS text
*.c text
*.cfg text
*.cht text
*.conf text
COPYING text
*.cpp text
*.def text
*-license text
*.h text
*.html text
*.ini text
INSTALL text
LICENSES text
Makefile text
*.py text
README text
RELEASE text
*.S text
*.sh text
*.txt text
*.ver text

# windows specific text files
*.sln text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf

# binary files
*.gz binary
*.ttf binary
cursor.tex binary
font.tex binary
Loading

0 comments on commit 6bf363d

Please sign in to comment.