Git Hard Rest Blunder
It’s been a about 5 months since I left my first job. More on that here. In the 1 year that I worked there, I was responsible for very small changes, hence small commits. So I never really had this problem that I’m going to rant about below.
Last night, I had about 12 files in which major UI changes were not staged for 5 days. 5 DAYS!. What did I do on the sixth night ? I did a hard reset! BAM every unstaged change (none of which were ever stashed or staged or committed before anywhere) gone. I stayed 2 hours up asking people on twitter, atom editor forums and where not, if this problem had a solution. Stackoverflowing (literally) bat shit crazy. Nothing. Zilch. Nada. I heard on forums and other web pages telling about how they were able to recover by their editor features, I think one of them was Web Storm which sort of saves saved versions of files separate from the versioning system versions. But it is PAID! And I’m JOBLESS!
Lesson Learnt ? Keep commit the groups of files leading to one change and I did that today regularly. I’m proud of myself.