Already tracked
A live Stripe key sitting in a tracked `.env` file, in a repo that had listed `.env` in its `.gitignore` since 2023. The line was correct and it had never done anything.
6 posts filed under Git, newest first.
A live Stripe key sitting in a tracked `.env` file, in a repo that had listed `.env` in its `.gitignore` since 2023. The line was correct and it had never done anything.
I spent my first full day on an inherited store reading the file everybody had warned me about, and the git log said nobody had changed a line of it since 2018.
I ran git blame on a line I could not explain and got back a one-word message with my own name on it, and the word was fix.
Almost nothing is actually gone after a bad reset, because git keeps a local log of everywhere HEAD has pointed for the last ninety days and hardly anybody knows to look at it.
The ugliest 40 lines in the store I took over are wrapped in a comment telling me not to change them, and the email that comment points at stopped existing years ago.
Halving a commit log is a mechanical process that finds a regression while you make coffee, and the only genuinely hard part is writing down what you are looking for before you start.