4 ms·
While I agree that you should rotate accidentally exposed secrets, it should be noted that you can remove old history from git reflog by expiring it I see git
by belinder 3y ago
While I agree that you should rotate accidentally exposed secrets, it should be noted that you can remove old history from git reflog by expiring it
I see git reflog kinda like an OS recycle bin
- Kluggy 3y agoHow do you do that once it's on Github's servers?
- latchkey 3y ago[deleted]
- javawizard 3y agoThat link provides instructions on how to access commits from the reflog of a GitHub repository, not how to expire or otherwise delete them.
- KTibow 3y agoSounds like it happens automatically: https://stackoverflow.com/questions/56020314/how-frequently-do-github-run-git-gc-on-repositories https://stackoverflow.com/questions/56020314/how-frequently-...
- mxmlnkn 3y agoI think this isn't true anymore since at least the introduction of the unwanted Github activity view: https://docs.github.com/en/repositories/viewing-activity-and-data-for-your-repository/using-the-activity-view-to-see-changes-to-a-repository https://docs.github.com/en/repositories/viewing-activity-and...
- dunham 3y agoThat's only client side, and you also need to "gc" it to get rid of it, or it will still be in .git/objects and can be retrieved via something like `git cat-file`.
- coldpie 3y agoWe're getting a little off-topic, but even git-add will put it in the object store without even committing! I once saved my boss's bacon with that. He had git-added a presentation file he'd been working on to commit it, but accidentally nuked his changes with "git-reset --hard" before comitting. He mentioned his mistake in chat, and we were able to recover the lost object by sorting files in the object directory by last-modified and cat-filing it back out by that ID. He bought me a beer for that after work that day. Good times. Read gitcore-tutorial(7), folks. You too might save someone's bacon, some day.
- 01HNNWZ0MV43FF 3y agoI also know this, because I accidentally added a huge media file and `git add .` took too long to return and then `.git` was huge lol