Question: Is there any way to distribute smudge and clean hooks to remote repository? It's stored in `.git\config` so it is not tracked by Git.

Our client use slightly different environment and SVN(!) so we have to branches so we could merge our changes. It would be great if I could share those hooks for smudge and clean.

Answer: 
Yes, the answer are [`.gitattributes`](http://git-scm.com/book/en/Customizing-Git-Git-Attributes). A slightly more objective description how to set the filters can be found in the [man-files](https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html).

Put your attributes into a `.gitattributes`-file and save it into your project-folder. You're then able to track and commit it like other files.

Unfortunately, changing the filter itself needs you to access the `.git/config` of your client at least once. In my opinion you have two options for realizing that: deliver a second project-specific config or change the filter-calls to invoke delivered scripts.

### Deliver the git-config

This is a simple approach to version an additional part of the git-config. We're going add a additional include-path to the repo-config and a additional config-file within the repository.

This is how i added another include to the `.git/config`:

```
[include]
  ../.gitconfig

```

Then you'd create the `.gitconfig`-file - i tested it with the `user.name`-setting:

```
[user]
  name = Mickey Mouse

```

After that you'll add the `.gitconfig`to your repo. Try your changes with:

```
$ git config user.name
Mickey Mouse

```

But i must admit that this constellation is a **security-risk** since you're able to overwrite all configuration-settings with a commit.

Another possible - and safer but more elaborate - solution would be to create the filters in the config and let them point to scripts within your repository.
One possible option is to add them directly to the repo along with instructions about how to copy them over to the .git directory.