Is it possible to have all "git diff" commands use the "Python diff", in all git projects?
Posted
by EOL
on Stack Overflow
See other posts from Stack Overflow
or by EOL
Published on 2010-05-07T12:55:43Z
Indexed on
2010/05/07
12:58 UTC
Read the original article
Hit count: 289
When including the line
*.py diff=python
in a local .gitattributes file, git diff
produces nice labels for the different diff hunks of Python files (with the name of the function where the lines changed take place, etc.).
Is is possible to ask git to use this diff mode for all Python files across all git projects? I tried to set a global ~/.gitattributes, but it is not used by local git repositories. Is there a more convenient method than initializing each new git project with a ln -s ~/.gitattributes
?
© Stack Overflow or respective owner