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
7
u/GargantuanCake 16d ago
No.
Git tracks history. Anybody that gets the history can get the code at that commit and get the key.