So I'm using drupal that is version controlled via git
I modified the bootstrap.inc file in drupal that I don't want to push to the origin and should only be in my local environment
I added bootstrap.inc to my ~/.gitignore
however whenever I do a git stash save, my changes in bootstrap.inc gets reset to the head version even though I'm ignoring it...
is there a way to prevent this from happening and still have my own personal changes to bootstrap.inc not being reset by git stash?
In general, if you have configuration file that contains some site specific configuration (especially passwords, etc.), it is not very good idea to track such file in any version control system.
Instead, you should try to find a way to keep global config intact, and create site specific overrides. In case of Drupal, it seems like there is a way to do just that with conf_path()
function, which will read all site specific info from separate config file.