I have been using github for one project for some time now, but only as a issue tracker. So, tonight I devoted some time to get things going with code as well, and made a rookie mistake: I committed credential files and other unnecessary data. I have added those to the .gitignore file now and they should be not an issue anymore, but I see they are available in the history.
That poses a security issue so I have to sort this out and remove that sensitive data there. I am the currently sole developer, so that's why I kept the code on my PC only and on the actual server, but wanted to get a hang of this as well.
So far, I have tried this article, this one as well and found some questions on SO, but haven't been able to figure this out. I mostly get some sort of error like this one: fatal: ambiguous argument 'rm': unknown revision or path not in the working tree.
I would delete the whole repo, but I have quite a lot of issue tracking data there, so I need to keep that, so this is not an option. I don't mind about other commits, I can start from scratch with code from my local machine, but need some way to lose older commits and their complete history, or change those files (some things in .gitignore are directories, so that might be very tedious to remove).
I tried with git rebase -i, but there I see only my last three commits (testing), which were not pushed, the remaining ones that are online, 10 or so of them don't show there.
The repo I am using is private one, with me and a client only having access, so no 3rd party has seen this.
I am new to git so thanks for your time and help!