Tldr: fucked up windows boot sector somehow, saved 4 months worth of bachelor thesis code, never hold back git push for so long!

Holy jesus, I just saved my ass and 4 months of hard work...
I recently cloned one of my SSDs to a bigger one and formatted the smaller one, once I saw it went fine. I then (maybe?) sinned by attaching an internal hdd to the system while powered on and detached, thinking "oh well, I might have just done smth stupid". Restart the system: Windows boot error. FUCK! Only option was to start a recovery usb. Some googling and I figured I had to repair the boot section. Try the boot repair in the provided cmd. Access denied! Shit! Why? Google again and find a fix. Some weird volume renaming and other weird commands. Commands don't work. What is it now? Boot files are not found. What do I do now? At this point I thought about a clean install of Windows. Then I remembered that I hadn't pushed my code changes to GitHub for roughly 4 months. My bachelor thesis code. I started panicking. I couldn't even find the files with the cmd. I panicked even more. I looked again at the tutorials, carefully. Tried out some commands and variations for the partition volumes, since there wasn't much I could do wrong. Suddenly the commands succeeded, but not all of them? I almost lost hope as I seemed to progress not as much as I hoped for. I thought, what the hell, let's restart and see anyway. Worst case I'll have to remember all my codeπŸ˜…πŸ€¦.
Who would have thought that exactly this time it would boot up normally?

First thing I immediately did: GIT PUSH --ALL ! Never ever hold back code for so long!
Thanks for reading till the end! πŸ‘ŒπŸ˜…

  • 3
    I always push my changes, max time I stay without pushing stuff is a week. I'm glad you could recover your files, now you've learnt to never forget to push XD
  • 2
    That's Why I usually do an end of day push if nothing else, saves you these kinds of heart attacks
  • 8
    Alternatively, that's why you always have a bootable linux pendrive ready, even if you despise Linux for some reason.
  • 3
    @Lor-inc Agree, I can recommend Knoppix for that one. At least you can read all the files without permission fuckups.

    And apart from Git, I'd also save snapshots on two local USB sticks in regular intervals, and attach the sticks only during saving.
  • 0
    @Lor-inc I had an extra hard drive for linux that I didn't use anymore, which wasn't so important. I chose that to override with a backup image. Turns out I'm incapable of using it to clone my drive, so it was all for nothing.🀦
    General takeaway: I'm incompetent when it comes to using backup files overall.
    I don't use Linux because I don't like the user experience for multiple reasons. Let's not start a flame war here...
  • 0
    @Fast-Nop I have an hdd attached that should backup at least my personal files. Things you don't remember when you need them the most...
  • 0
    I usually try to keep git commits as small as possible. But that's not always possible. Sometimes the application does not compile if you don't change a lot and you couldn't use git bisect. So, if I have multi day commits, this is my workflow.

    git checkout my_personal_branch_my_name
    git add .
    git commit -m "tmp_commit"
    git push -f

    And when I start working again:
    git reset HEAD^

    You have to have a branch where only you work. You force push over the last branch. Make a tmp commit over everything. And then remove it again.

    Alright, dangling files of stuff you didn't want to commit. That's a problem that did not become a problem for me, yet. I try to write my .gitignore files first. But I am sure there is a solution for that, too.
  • 2
    @cb219 I didn't mean as a daily driver. But when you need to recover months of work, UX is less of a concern. I recommended it because I have yet to see a disk that isn't encrypted or physically broken and I can't mount it after 3-4 hours of shooting in the dark with data recovery tools.
  • 1
    @cb219 Even when using Windows only, it's a good idea to make disk images. Since I'd never trust a disk imaging solution that works from the disk under backup, Windows based solutions seem fishy.

    So a live Linux distro using Clonezilla is a good options and saveguards against disk failure as well as total Windows fuckups. Clonezilla is pretty easy to use with its wizard-style UI.
Add Comment