I'm no security expert but I'm not sure if I get it - assuming that your code is well written, how would exposing the source code and change history make it more vulnerable? By using this logic, every piece of open source software is "vulnerable". Security through obscurity is not really security.
I thought not checking in safety critical things such as passwords or keys into the repository tree is a standard practice. If it's not, it should be.