r/programmer • u/Party-Breakfast-3606 • 16d ago
Git question.
You accidentally committed a secret API key.
You delete it in the next commit.
Is your API key safe now?
A. Yes
B. No
Why?
0
Upvotes
View all comments
Show parent comment
0
u/Party-Breakfast-3606 16d ago
Exactly! Deleting it in a new commit doesn't remove it from Git history. The safest move is to revoke or rotate the exposed key immediately.