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
Used a starter to scaffold a new project. Have never used that starter before but it has more than 1400 starts on Github.
Two days after.... so far so good. The created project structure used some tools I haven't used before, some are good, others are not so good, but anyway I am towards the first release of my codes. I have done countless 'npm run build', 'npm run test', 'npm run fix', etc., but.... my fault, I haven't committed once since starting the project, thinking I would commit when the next function is implemented, next test case passed.... after all, what could go wrong anyway?
Finally, one last test case passed, I think I will commit and run 'npm publish'.... but wait, had a glimpse of the scripts section in package.json, there's a command named 'all'. An voice came out of nowhere was talking to my subconscious mind, "all.... build, lint, prettier, test..... yeah you should run all... it's another build script, the worst you can get is just some harmless error messages.....", and my fingers typed 'npm run all'...
Time stopped for a few seconds, file structure in project explorer was shifting, files & folders were disappearing & appearing, what's happening... and I looked at the 'all' script closely for the first time....
WHAT THE HELL, WHO SHOULD PUT 'git reset --hard' IN A BUILD SCRIPT WITHOUT ANY PROMPT????!!!!!!!
MY PLAN WAS TO COMMIT AND GO TO SLEEP, IT'S 1AM NOW!!! WHERE CAN I RECOVER THE LOST FILES????
rant