How to store a git config as part of the repository?

I’m using filters to mangle files during checkout like described here.
Now the problem is that filter definition is only stored in my local configuration file:

$ cat .git/config
....
[filter "dater"]
        smudge = /home/.../expand_date
        clean = perl -pe \"s/\\\\\\$Date[^\\\\\\$]*\\\\\\$/\\\\\\$Date\\\\\\$/\"

If my coworkers want to benefit from this Date expansion, they need to copy my filter definition. And if I change it, I need to notify them, etc..

So can I store this filter definition part of .git/config in repository and make git use it?

2 Answers
2

Leave a Comment