I\'m deploying a Rails app on Heroku (for now) via git, and would also like to have a public version for people to look at. Some files are sensitive and should only be commi
I know this sidesteps the question, but I would simply have two git repositories. Then you can just add them permanently to the ignore list on the public repository.
You can have a second repository for the private files, and a small script to copy the changes to the correct location on the production system, when doing your deployment.
This reduces the risk that when you go on vacation and the new intern updates the public repo, your private information will accidentally get leaked. ;-)