.gitignore
A live payment key in a tracked `.env` file. The repository had `.env` in its `.gitignore`, and had done for two years.
6 posts filed under Git, newest first.
A live payment key in a tracked `.env` file. The repository had `.env` in its `.gitignore`, and had done for two years.
A message at 4:10: "I think I've just deleted three hours of work." It took about 90 seconds to get it back.
I wrote a post a few years ago about the order I read an unfamiliar project in, and I've since decided the order was never really the point, and that the procedure's actual job is to stop me opening files at random and hoping.
Every other document about a codebase starts drifting the moment you save it. A commit message is welded to its diff forever, which makes it the only one that can't lie to you.
Somebody says the thing worked in June, there are 900 commits since June, and the temptation is to sit and think really hard, which is exactly the wrong instinct because a computer can do this in ten questions.
I inherited a codebase where the function at the center of everything is 211 lines long, and my first reaction was contempt, and my first reaction is always contempt and has never once been useful.