Hacker News new | ask | show | jobs
Is there any way to remove an already-pushed commit from GitLab?
1 points by bluewhalecove 80 days 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
2 comments

> 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...

thank you i got it
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!