Is there any way to remove an already-pushed commit from GitLab?
1•bluewhalecove•1h ago
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
Comments
genezeta•1h ago
> 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...
genezeta•1h ago
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...