Is it possible to have all “git diff” commands use the “Python diff”, in all git projects?

一笑奈何 提交于 2019-12-03 05:29:50

Quoting from gitattributes(5):

Attributes that should affect all repositories for a single user should be placed in a file specified by the core.attributesfile configuration option (see git-config(1)). Its default value is $XDG_CONFIG_HOME/git/attributes. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/attributes is used instead. Attributes for all users on a system should be placed in the $(prefix)/etc/gitattributes file.

To tell git to use ~/.gitattributes you need to put this in ~/.gitconfig:

[core]
  attributesfile = ~/.gitattributes

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!