4

I learned Git in the most ridiculous way possible.

Noob me, is using VSCode and i tried clicking the git icon. Now, i didn't know what i was doing and i suddenly made a git repo and i just checked on things (add changes and commit) and little do i know that it was all absorbed. I got skeptical (spying on files, i didn't know what's happening, etc.) so i clicked the "x" button and it warned me that it will be "completely deleted" and it will be an "irreversible action". Due to my stupidity, i pressed okay.

Then that was the time i knew, i fucked up.

But hey ho it took me 12 hrs to recover all files (1600 loose objects) that has been deleted using a 3rd party app (without any master, no last commit message, no everything, just objects a.k.a the blob files that git saves). I tried looking for easier ways to get the files, but it was there in front of me the whole time, so it took me longer.

Comments
  • 1
    oh btw i have a proper back up (last week), and it's so un-programmer of me to not back up the update (worth 2 days of coding), so i needed only some files. No need to recreate the same thing if we can retrieve it, right? Plus, it's a learning experience for me.
  • 0
    Do you like git now? (serious question) It's a very imposing cli tool, but once you learn the basics, oh so powerful.
  • 2
    @rozzzly it doesn't have to be CLI. You can use something like sourcetree
  • 2
    true, and a GUI gives you a good way to visualize things whilst getting started, but there's something for mastering the CLI
Add Comment