The usual way to resolve this issue is to not put real configuration files into the repository. Instead of
config/whatever.cfg
in your repository, save
config/whatever.cfg.example
and then manually copy config/whatever.cfg.example to config/whatever.cfg when you check the repository and configure it for your local environment.
source share