views:

97

answers:

1

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 changes are, 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?

+1  A: 

No, git only looks for attributes locally: .gitattributes and .git/info/attributes

Oblomov