I am developing an API client, and being a good git
user I did all my work on a feature branch. I made dozens of commits to my local branch but have not pushed it anywhere. I am now ready to merge my local branch into master
However during initial testing I had my API key in code which was then committed to my local feature branch. I've since fixed this and the current version of all code on my feature branch uses config files and has no sensitive information.
If I squash merge my feature branch into master
(with git checkout master; git merge--squash my-feature
) and push that, will the secret API key that was committed earlier and then fixed be visible by others? Or will squashing the commits render the secret unusable to anyone who doesn't have my local branch?