From 7ab2d72100ce6a3d47221099d61e18c9ade6ab73 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Mon, 3 Mar 2025 21:18:37 +0500 Subject: git: Add attributes --- files/.gitattributes | 13 +++++++++++++ files/.gitconfig | 1 + install.conf.yaml | 1 + 3 files changed, 15 insertions(+) create mode 100644 files/.gitattributes diff --git a/files/.gitattributes b/files/.gitattributes new file mode 100644 index 0000000..b6e1c41 --- /dev/null +++ b/files/.gitattributes @@ -0,0 +1,13 @@ +# See: +# - https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header +# - https://github.com/git/git/blob/cb0ae672aeabefca9704477ea8018ac94f523970/userdiff.c +# - https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81 + +*.css diff=css +*.go diff=golang +*.html diff=html +*.java diff=java +*.md diff=markdown +*.py diff=python +*.sh diff=bash +*.xhtml diff=html diff --git a/files/.gitconfig b/files/.gitconfig index b4fc4a7..b831675 100644 --- a/files/.gitconfig +++ b/files/.gitconfig @@ -39,6 +39,7 @@ pager = diff-so-fancy | less -+$LESS -FRX excludesfile = ~/.gitignore quotepath = false + attributesfile = ~/.gitattributes [log] decorate = short mailmap = true diff --git a/install.conf.yaml b/install.conf.yaml index 10de0e4..8af8ba7 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -29,6 +29,7 @@ # Git ~/.gitconfig: files/.gitconfig ~/.gitignore: files/.gitignore + ~/.gitattributes: files/.gitattributes # Vim ~/.vim: files/.vim ~/.vimrc: files/.vimrc -- cgit v1.2.3