One of the things you must understand that in git there's no real difference between a repository and a working directory. When you pull from a parent repository, you create your own repository.
.Gitattributes affect your local repository and only your local copy. Someone else can change their .gitattributes for their repository. After all, it's their repository. If a parent repository is receiving changes, it can use a pre-receive hook to verify the retrieved packet to make sure it follows the parent repository's policy. You shouldn't use .gitattributes to enforce policy, only to help you follow policy.
Subversion's auto-properties configuration is similar. It affects all working copies of that user. There's no individual configuration for each working copy. You can use a --config-dir
parameter on many Subversion commands to specify a different Subversion configuration file for that operation, so you could have multiple configuration files and use --config-dir
to specify that file. It's not convenient, but it's possible.
If you want to make sure your properties are set correctly, you need a pre-commit hook that checks the properties on a commit and rejects commits with invalid properties or property values on the files. I have a pre-commit hook that can do just that.