2023-10-15 17:21:01 +02:00
|
|
|
# If file is text, use lf line-endings and let forges show it in repo
|
|
|
|
# languages. For more information: `man gitattributes`
|
2023-02-21 14:35:31 +01:00
|
|
|
* text=auto eol=lf linguist-detectable
|
2023-02-21 14:34:29 +01:00
|
|
|
|
2023-10-15 17:21:01 +02:00
|
|
|
# Built-in diff patterns (disabled by default). The attribute `diff` implies
|
|
|
|
# `text` and the above attributes are inherited.
|
2023-10-15 17:40:36 +02:00
|
|
|
# https://www.git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header
|
|
|
|
# TODO
|
|
|
|
# diff=matlab
|
|
|
|
# diff=pascal
|
|
|
|
*.{adb,ads} diff=ada
|
2023-10-15 17:21:01 +02:00
|
|
|
*.bibtex diff=bibtex
|
2023-10-15 17:40:36 +02:00
|
|
|
*.cs diff=csharp
|
2023-10-15 17:21:01 +02:00
|
|
|
*.{c,cpp} diff=cpp
|
|
|
|
*.css diff=css
|
2023-10-15 17:40:36 +02:00
|
|
|
*.dts diff=dts
|
|
|
|
*.{ex,exs} diff=elixir
|
|
|
|
*.{f90,f,for} diff=fortran
|
|
|
|
*.fountain diff=fountain
|
2023-10-15 17:21:01 +02:00
|
|
|
*.go diff=golang
|
|
|
|
*.html diff=html
|
|
|
|
*.java diff=java
|
2023-10-15 17:40:36 +02:00
|
|
|
*.{kt,kts} diff=kotlin
|
|
|
|
*.{h,m,mm,M} diff=objc
|
2023-10-15 17:21:01 +02:00
|
|
|
*.pl diff=perl
|
|
|
|
*.php diff=php
|
|
|
|
*.py diff=python
|
|
|
|
*.rb diff=ruby
|
2023-10-15 17:40:36 +02:00
|
|
|
*.{rs,rlib} diff=rust
|
|
|
|
*.{scm,ss} diff=scheme
|
2023-10-15 17:21:01 +02:00
|
|
|
*.tex diff=tex
|
2023-10-15 13:44:41 +02:00
|
|
|
|
2023-10-15 17:21:01 +02:00
|
|
|
# bash & co aren't often Windows, so alway have lf line-endings regarldess
|
|
|
|
# of the above. Markdown is also included as I utilise doctoc, which
|
|
|
|
# requires lf line-endings.
|
|
|
|
*.{sh,bash,zsh} diff=bash eol=lf
|
|
|
|
*.{md,markdown} text diff=markdown eol=lf
|
2023-10-15 17:40:36 +02:00
|
|
|
|
2023-10-15 17:21:01 +02:00
|
|
|
# While this file is like .gitignore, negative patterns are forbidden and
|
|
|
|
# directory/ wouldn't recurse, thus directory/**. Also !attribute would set
|
|
|
|
# it back to unset.
|
|
|
|
# In this case Windows/** may also contain binary files, thus auto-detection
|
|
|
|
# is repeated and eol=crlf as it's unlikely to be of use outside of Windows.
|
|
|
|
Windows/** text=auto eol=crlf
|
2023-02-21 14:34:29 +01:00
|
|
|
|
2023-10-15 17:21:01 +02:00
|
|
|
# Similarly these files are unlikely to be encountered outside of Windows.
|
|
|
|
# The "text" attribute is used as otherwise they rely on auto-detection of
|
|
|
|
# textness since there is no diff attribute set.
|
2023-02-12 09:30:18 +01:00
|
|
|
# Ref: https://rehansaeed.com/gitattributes-best-practices/#line-endings
|
2023-02-21 14:35:31 +01:00
|
|
|
*.{reg,[rR][eE][gG]} text eol=crlf
|
|
|
|
*.{bat,[bB][aA][tT]} text eol=crlf
|
|
|
|
*.{ahk,[aA][hH][kK]} text eol=crlf
|
2023-10-15 17:21:01 +02:00
|
|
|
|
|
|
|
# These files are scary, let's not touch them. The attribute "lockable" is
|
|
|
|
# provided by git-lfs. https://github.com/git-lfs/git-lfs/wiki/File-Locking
|
|
|
|
LICENSE text lockable
|
|
|
|
CITATION.cff text lockable
|