Shouldn't the per-project config file (/path/to/my/project/.npmrc) be in the .gitignore file? Ref: https://docs.npmjs.com/files/npmrc.html