I thought it would be a good idea to summarise what happened this week hoping that writing the incident down will help future iterations in explaining this to others. Anyone – if you are familiar with this problem, please reach out as any help is welcome.
Our group created a dedicated DirecterHers email account and related group GitHub repository to publish our website, files, data, and informative material.
407 git remote add origin https://github.com/directhers/dh_praxis.git 408 git status (mmm something is wrong here) 410 git add -A (maybe this will help) 412 git status (shite, all my personal files are gone) 413 git restore (double shite nothing is working) 414 git restore -A 416 git restore 417 git reset –hard (triple shite! Directhers files are also gone) 418 git status 423 cd desktop 424 history 425 cd desktop 426 cd dh_praxis 427 git reflog 428 cd desktop 431 git reflog 433 cd dh_praxis 434 git reflog 435 git reset –hard 436 git status 438 cd desktop 439 git reset –hard 440 git reflog 443 cd desktop 444 git reset 445 git checkout deletedfile 446 cd desktop 447 cd dh_praxis 448 git checkout deletedFile 449 git switch master 450 git switch main 451 git switch master 452 git restore 453 git restore –hard 454 git restore–staged 456 git rm –cached
It gradually became clear that nothing would work, especially after realising that reverting staged items is one of the most difficult things to do (based on the various forums on this topic). Nevertheless, I made further attempts, also with the help of Filipa and Zico.
Finally, we identified the origin of the issue, which was that I had made (evidently by mistake and certainly due to my inexperience) my .git folder on the desktop the origin (not sure whether this makes sense, but it is the only way in which I can explain this), which meant that .git was tracking all the files on my desktop.
I managed to find a folder called lost-and-found in the .git folder and, with the help of Zico, understood that the files contained in it were blobs (binary large objects collecting binary data stored as a single entities). These files presented themselves without an extension and seemed very difficult to decipher (snippet below). I used the below commands to try and isolate some letters in the titles that would help me to match string with relative extension.
grep -e html -r ./ OR grep -e PDF-r ./
At present, I am still in the process of recovering my files. On the bright side, I found 3 of the files that belonged to the original DirectHers folder and I am hoping to find more in the next few hours.
Clearly, the .git folder is destined to oblivion and I no longer wanna see it sitting on my desktop threatening my poor files!
What a week!! I really felt sorry for all those times where I made fun of my mum claiming to have lost her data while typing in Word!Come on mum, not possible !! You know what, it is possible, and it can happen! Note to future self: never (ever) make jokes of older family members claiming to have suddenly lost their files! Ah, last but not least: back up your files!