1

I know that I can set up a .gitattributes for each project that I have in GIT, but I work with a lot of projects and they all have the same types of binary files. Is there anyway I can just set these filetypes in my git config and not have to worry about doing it for each project? That would be very useful.

Note that I am working on a small private development team, so we would all have the same git setup on our computers.

1 Answer 1

2

Set the core.attributesfile in the global config to point to the gitattributes file that you want to affect all the repositories:

core.attributesfile

In addition to .gitattributes (per-directory) and .git/info/attributes, git looks into this file for attributes (see gitattributes(5)). Path expansions are made the same way as for core.excludesfile.

For all users:

Attributes for all users on a system should be placed in the $(prefix)/etc/gitattributes file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.