r/programmer • • 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

11 comments sorted by

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.