Skip to content

Instantly share code, notes, and snippets.

@iangreenleaf
Created September 20, 2010 21:30
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iangreenleaf/588684 to your computer and use it in GitHub Desktop.
Save iangreenleaf/588684 to your computer and use it in GitHub Desktop.
Better diffs in git
[diff "ruby"]
wordRegex = (@@?|\\b:|[^:]:)?[[:alnum:]_]+|:\"[^\"]+\"|::|[^[:space:]]
[diff "php"]
wordRegex = \\${0,2}[[:alnum:]_]+|::|->|[^[:space:]]
# Must go in .git/info/attributes or .gitattributes for each repo
*.rb diff=ruby
*.php diff=php
*.html diff=php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment