Skip to content

Commit

Permalink
Add .gitattributes for nicer diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
mat committed Oct 23, 2020
1 parent d44489e commit 8956f1a
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Sources:
# https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more
# https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81
# https://github.com/alexkaratarakis/gitattributes/blob/master/Java.gitattributes

*.cs diff=csharp
*.css diff=css
*.go diff=golang
*.gradle diff=java
*.gradle.kts diff=java
*.html diff=html
*.java diff=java
*.md diff=markdown
*.pl diff=perl
*.py diff=python
*.rake diff=ruby
*.rb diff=ruby
*.xhtml diff=html
1 change: 1 addition & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@
# whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
editor = vim
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes

[rerere]
enabled = 1

0 comments on commit 8956f1a

Please sign in to comment.