I accidentally managed to commit a file that contains passwords, and push the result into GitLab. The project is private, and the passwords aren't actually important, but I want to remove all trace of them from GitLab, and from my local repo, though I need the files to continue to exist on the local filesystem.
So far, I did a git `rm --cached ' but I'm not sure if that really removed all trace of the file in the repo, and it has the side effect that now I can't do a push with the error "Updates were rejected because the remote contains work that you do not have locally."
I guess I could perhaps just destroy the GitLab repo, rebuild it and re-push, but a) I'd like to be sure that the git rm
I mentioned above will have done what I want, and b) it seems there might be an easier route?
I've found lots of answers that dance around various permutations of these elements (though nothing specific to GitLab). Frankly, however, they're all just different enough that I'd prefer an answer that's specific to this particular set of constraints.