Suppose we have a config file with sensitive passwords. I\'d like to version control the whole project, including the config file as well, but I don\'t want to share my pass
My preferred answer to this was already mentioned here: check in a dummy file, generate the "real" file by copying the dummy file at runtime, and ignore the "real" file in your VCS.
I already answered a similar question, with a complete example how to do this in Visual Studio:
how to ignore files in kiln/mercurial using tortoise hg "that are part of the repository"