I was working on a project which uses the API secret ids to perform a particular task. Initially, I used them (secret ids) as a string in my project and committed it to git. later I moved those secret ids to my environmental variables and again committed and pushed it to Github. Now when I go to the last commit, it shows the commit difference between the file (as usual) and it also shows the secret ids which I used before as string in my code.
This can cause security issues. How can I make a commit not show the commit diff for a particular commit? or any alternative solutions would be appreciated.