0
Would you like to know how I delete sensitive data (passwords and so on) from a remote repository commit, but keep it in another one? I explain:
I have a repository on Github and another on Heroku, my project is pointing to the two repositories. When it comes to going up in Heroku I need to leave sensitive data such as database password, AWS, etc. On Github this information should not go up, but when I give a "git add." and then a "git commit -m..." that commit is in Stage, I can send it to Heroku only by giving a "git push Heroku", but when I need to change something in the project and send it to the github this time the sensitive information will be visible in this penultimate commit, got confused, but it became clear?
Note: It’s not about not checking the file, but deleting a commit from Stage (which contains the sensitive data), keeping the other changes from the last commit.
Possible duplicate of How to stop watching changes in a particular file?
– Jéf Bueno
it’s not about not watching the file, but deleting a commit from Stage (which contains the sensitive data), keeping the other changes from the last commit.
– tiagomac