Is there any way to remove an already-pushed commit from GitLab?
We had an internal mistake where a teammate committed sensitive information to a repo.
I already cleaned up the visible history, but I’m trying to figure out whether the underlying commit can still be accessed if someone still has a direct link to it.
What is the correct way to handle this on GitLab?
Attached screenshot for context: https://postimg.cc/KRybFjFz
3 comments
If it's a password or secret api key, assume it has been harvested by nasty robots and an evil hacker is planing to use it. Rotate them as soon as you can, aka NOW!
> I already cleaned up
You'd probably need to detail what exactly you have done to clean up, but it sounds like you didn't actually remove the commit?
You can remove a commit with an interactive rebase and then force push the new tree. Or depending on the current state of your tree, you can use other options. In any case, you have answers to this on Stack overflow. e.g. https://stackoverflow.com/questions/40245767/delete-commit-o...
You'd probably need to detail what exactly you have done to clean up, but it sounds like you didn't actually remove the commit?
You can remove a commit with an interactive rebase and then force push the new tree. Or depending on the current state of your tree, you can use other options. In any case, you have answers to this on Stack overflow. e.g. https://stackoverflow.com/questions/40245767/delete-commit-o...
thank you i got it