If I want to submodule a Git repository:
https://github.com/shadowhand/paypal
…that has a config file:
https://github.com/shadowhand/paypal/blob/master/config/paypal.php
…how do I contribute to the project without committing my version of the config file?
When you commit, don’t add that file:
Before committing, check with
git statusthat you haven’t staged any modifications to the config – if you accidentally have, usegit reset HEAD config/paypal.phpto unstage them.(And for what it’s worth, this doesn’t really have anything to do with the fact that you’re using this repository as a submodule.)