Tag Archives: files

GS: Journal Entry (10/12), 29th April

Dear Journal,

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.

I initially placed the folder with my html, css, and javascript files on my desktop, ready for it to be pushed to the new repository. After the creation of a new ad-hoc online repository, I went to my GitBash, or the terminal, and attempted to add the newly created origin, subsequently checking my git status –  I had done this before so I expected to encounter virtually no difficulties in the process. Bizarrely, I noticed that the files listed as ‘ready for staging’ were numerous and certainly not in the dedicated dh praxis prject folder; in this sense, it appeared that git was showing me the files which were living on my desktop. To begin with, I did not think too much of it, and chose to add the newly created online origin once more. And then, the fatal error: the decision to attempt to add all files for staging under the wrong assumption that this could be an easy test to better understand the problem (command: git add -A). All the files on my desktops magically disappeared, other than 3 folders which had already been pushed to my personal repository.  The worst part had yet to come – when trying to restore those files, the stuff in the dx praxis folder also suddenly disappeared. Below the fatal command and the routes tried to restore the lost files.

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 ./Blobs

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!