3 ms·
How do I set up Git to thank future generations for removing code I regret checking in?
by raldi 2y ago
How do I set up Git to thank future generations for removing code I regret checking in?
- throwup238 2y agoGit hooks? https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
- teqsun 2y agoAdd a server side hook listening for the change https://stackoverflow.com/questions/36327382/git-precommit-hook-check-whether-line-content-has-changed https://stackoverflow.com/questions/36327382/git-precommit-h...
- hinkley 2y agoIf I know I’m writing the code under protest or to deal with a bug in a library or elsewhere in the system, I put it in the commit message, and set up the commits so the worst change can be reverted by itself. Essentially here’s the reason we “had” to do this. Subtext: here is my blessing to revert this when it’s not necessary anymore. In a way it’s my Chekov’s Gun. Load the weapon, leave it lying around and wait for the third act.
- raldi 2y agoAh, the antidote to Chesterton's Fence.
- BurningFrog 2y agoI sometimes make a test that will go red with an "X has changed, now you must do Y" message.