Skip to content

Instantly share code, notes, and snippets.

@ancho85
Created July 21, 2016 14:33
Show Gist options
  • Save ancho85/eb60a30f28a6e3a0962241e6f17d8c94 to your computer and use it in GitHub Desktop.
Save ancho85/eb60a30f28a6e3a0962241e6f17d8c94 to your computer and use it in GitHub Desktop.
.gitattribute inside .git directory (.git/info/attributes)
# git-svn reverse the meaning of ours and theirs, thus I choose here "theirs" because I want my local gitignore file untouched
# https://stackoverflow.com/questions/2959443/why-is-the-meaning-of-ours-and-theirs-reversed-with-git-svn/2960751#2960751
.gitignore merge=theirs
# excluding files from diff
# https://stackoverflow.com/questions/1016798/excluding-files-from-git-diff
*.exe -diff
*.pyd -diff
*.tgz -diff
*.dll -diff
*.png -diff
*.gif -diff
*.rar -diff
*.zip -diff
*.xls -diff
*.so -diff
*.gz -diff
python/python24/** -diff
bin/OpenOrange -diff
bin/OpenOrange140 -diff
# custom command
# https://stackoverflow.com/a/10421385
test_*.py diff=nodiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment