In my project I have config files that have private information. I committed some example templates to Github, but I have the actual configs in my working copy so I can buil
That looks like what a content filter driver (using .gitattributes declaration) is for:
(image from "Customizing Git - Git Attributes", from "Pro Git book")