Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
What IDE are you using? I know a bunch that have their own file saving history and I just discovered it this year.
-
@melezorus34 No te creas. Found it first on IntelliJ Idea. A couple days ago on VSCode.
-
I did something similar but then i just performed a mixed git reset to the previous commit, looked through the diffs in PHPStorm's comfortable diff view and reverted the changes i didn't want selectively before finally commiting the fixed changeset.
Thanks to git and a good IDE, what could have been really annoying and error prone to correct was just an hour of fine-grained cherry-picking.
Related Rants
Two brainfarts that resulted in... a lot of pain
I had been coding all day, ~6hrs. I was in the zone, so I hadn't saved to git. It was all uncommitted changes (you see where this is going...)
Brainfart#1: The code used the "Contact" class, but for some reason my hands typed "Product" in this ONE line.
Brainfart#2: I became aware of Brainfart#1, so I changed the variable from "Product" to "Contact". However, I instinctively pressed F2, "Rename Symbol", instead of just changing the variable I was using. Now ALL of the references to "Product" were to the "Contact" class instead, across all of our code.
I finished coding. I committed and pushed the changes, closed the IDE, and left the desk for a snack. When I came back, the automated tests were failing due to an import error. That's when I noticed my mistake. I couldn't do Ctrl+Z because I had closed the editor. I had to change the names one by one across all of our code. "Contact" and "Product" are probably our two most used classes ðŸ˜
rant
rename
ide
refactor
brainfart