When the repository was set up, in the initial commit one of the added files contained sensitive data (a programmers personal info) that should not have been there. Is it possible to completely erase that from the git history? Not the whole file, only a few lines with the sensitive data.
The repository is fairly new so there are no branches and that specific file was not modified since the initial commit. (PS: I'm fairly new to git, I don't yet understand complex commands)
You can edit the file now to remove the offending content in a new commit, then interactively rebase that commit. A step-by-step guide is here: https://stackoverflow.com/a/21353994/4323 but the gist is:
make sure you have a backup
edit thefile
git commit thefile -m "remove details"
git rebase -i --root
Now you will see a list of commits. Change the last one ("remove details") from "pick" to "fixup", and move it to be after the first commit.
You'll probably need to git push -f
after this, to rewrite history at your origin server.