❔ credentials in git

so I been using git locally and in a private repo, and I didn't exclude the account credentials from the repo. But if I add the credentials file to the .ignore, then push and make the repo public, the old file will still show up in the change history, yeah?

How do I get rid of the existence of this file entirely?
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.