News for hackers. Stuff that matters.
Re:Shellfirm: Intercept risky patterns at the command line by ekimekim on Sunday July 31, 2022 @10:37AM (#32295784)
My solution for this is a script that commits all my changes then tags the resulting commit with a basic descriptive name. Something like this:

    git discard bad-idea-didnt-work
Which creates a tag discarded-bad-idea-didnt-work, then resets back to the previous commit.

I can still find and rescue the changes later by looking at my tags.

Others have suggested using the stash for this but I prefer to keep my stash stack free for shorter-term contexts, eg. if I'm halfway through something but need to go checkout another branch briefly.

Re:Shellfirm: Intercept risky patterns at the command line by skykooler on Sunday July 31, 2022 @12:43PM (#32296755)
Would you mind sharing that script? It sounds useful.