It has said right from the start: You need to read my previous blogpost to understand and get an idea about what I’m going to talk about in this one.
As almost any other company and institution worldwide we’re working with Git at Locate a Locum as well. So far, so good. From the start of my placement I never had any problems with Git which I mostly thank my colleagues Benjamin and Sebastian back in Berlin. So at this point a huge thank you to both of you!
On Friday I tried to commit and push my final work, the „Contact Us“ page (see my previous blogpost). I started with git checkout -b feature/contact (-b stands for new branch, so for every new created page or feature we always create a new branch for it). But a little misfortune happened with my first command. I just typed git checkout without any argument accidentally (my hands were faster as my mind). Then I retyped it correctly again. And this was the moment where the whole disaster started, where even tears, yes tears were involved… And this all right shortly before my home time and start to my last FULL weekend in Belfast. I’ve to be careful not starting to be too emotional again and to stray from my actual story. Let’s get back to the dry facts.
So I pushed it as always (a Git action which actually does what it calls like), I sat back after and prepared myself for the weekend already, made plans and thought about food as usual. It was time to turn off my laptop finally and to close all the open programs and tabs. In the moment where I was just about closing my editor „Atom“, I’ve noticed something strange. The structure of my files on the left side of the editor looked differently.
I took a closer look and started to realize that some of my files were completely missing!!! This was the moment, where my heart was in my mouth… I started being in state of panic and tried to restart the whole project with the terminal on port 8080 and to open the localhost:8080/contact page again. „404 – Page not found“ was being displayed.
I tried it again and couldn’t believe it. It was all gone! I ran to my colleague Paul immediately to ask for help. We started to find the source of the problem and so the endless googling began till we found a thread at the very famous forum (actually the most famous and biggest forum for developers) „Stack Overflow“. There were a lot of people apparently, who made the same mistake as well. You can always get sure that answers of open question, which got voted highly, are very trustable. The most voted answer included that if there wasn’t any commit before typing git checkout without any argument, not only the changes won’t be adopted, no, the changes will be completely deleted…
But I don’t want to overflow you with too many technical details – to cut this long story short: There wasn’t any way back, I ended up crying (so what? It only shows that I’m really passionate about my work) and have to build the whole contact page again with it’s own class and also the footer for some weird reason. Even my colleagues still don’t know why. Consequently I’ve to build it up from the very beginning but thank god I still have the precious screenshot of it and I still can remember every difficulty and how I solved them.
By the way: None of my colleagues were upset or so – even quite the contrary. They’re already really happy with all the work I’ve done till now. But it was just blaming myself. They tried to cheer me up with some really worse stories, where mine seemed so small and laughable compared to their stories suddenly. They even tried to convince me to go with them for some after-work beers but I already had an upcoming appointment at 06:30pm with my personal trainer which was the best thing and decision in retrospect. I felt eased, energized and not frustrated anymore after our session. I started to see everything in a not so dramatical way anymore and prepared myself mentally for the new week already.