2

My git files are 50% of the time corrupted for no reason. I have no idea why, and hope one of you knows how to solve this.

I currently have a External SSD (Samsung T5, connected via USB, being seen as SCSI device) formatted to exFAT. If I work on my laptop, do push and pull some things, then close GitHub and shutdown, 50% of the time, whenever I connect the SSD to my PC, the git files in the .git folder are corrupted.

I found out that this can be resolved by changing the drive's policy from Quick removal to Better performance, but that resolved in a problem that I cannot eject my drive, so that's a no-go.

As the git files are corrupt, I have no way to delete them other than CHKDSK F:\ /F, which also removes some random files often, so that's also a no-go.

Anyone any idea how I can resolve this matter?

8
  • 3
    "this can be resolved by changing the drive's policy from Quick removal to Better performance". Hmm, that's surprising. I would have expected the other way around as quick removal should disable disk caching ...
    – DavidPostill
    Commented Oct 15, 2017 at 8:39
  • Do You Really Need to Safely Remove USB Flash Drives? is worth a read.
    – DavidPostill
    Commented Oct 15, 2017 at 8:40
  • Either way, the USB drive should be safe to remove if you completely shutdown the laptop. Are you doing a full shutdown? A hybrid shutdown? A sleep? A hibernate?
    – DavidPostill
    Commented Oct 15, 2017 at 8:41
  • 1
    @DavidPostill I know, but it somehow "does it's job better" according to a lot of folks on SO. It is not per se a USB drive. It is indeed connected via USB, but it's a SCSI device according to Windows. I don't know if this has anything to do with it's behaviour, will add it in the question. I close all open programs, then hit shutdown, so it is a full shutdown.
    – Jason
    Commented Oct 15, 2017 at 9:40
  • 1
    @MarkD Then that would be the problem, before taking it to another PC you must eject it, booting your laptop if needs be, or otherwise you need to disable fastboot in Windows so that it does a "normal" shutdown.
    – Mokubai
    Commented Oct 15, 2017 at 20:47

0

You must log in to answer this question.