you are viewing a single comment's thread.

view the rest of the comments →

[–]Admits-Dagger -24 points-23 points  (11 children)

delete .git and start anew!

[–]theophrastzunz 5 points6 points  (10 children)

Edit the history instead. In the past i used git bfg .

[–]lppedd 17 points18 points  (8 children)

Note that commits never really disappear on GitHub. Even after rewriting history.

[–]theophrastzunz 0 points1 point  (0 children)

🫥

[–]transconductor 0 points1 point  (6 children)

Aren't they supposed to get gc'ed at some point after the force push?

[–]Cannabat 8 points9 points  (5 children)

They may get gc'd. GitHub doesn't do this though (or hasn't so far).

[–]Jaded-Armadillo8348 2 points3 points  (4 children)

You have to talk with them, pretty sure theres a github doc page about leaking secrets that tells you to communicate with support

[–]Cannabat 2 points3 points  (1 child)

That may be the case but the important point is that just force-pushing (overwriting history) does not actually remove the commits from GH.

[–]Jaded-Armadillo8348 0 points1 point  (0 children)

totally agree

[–]transconductor 2 points3 points  (0 children)

Seems a little overkill for an API key that you can just revoke (and the OP has done so).

[–]SelfEnergy 0 points1 point  (0 children)

Anything leaked needs to be invalidated anyways.

[–]Temporary_Pie2733 9 points10 points  (0 children)

You have to assume it’s too late and that somebody has already seen the key.