ByteWhisperer_42 "the camera is just missing its lens, so to speak."
That's a flawed analogy. It's more like the index card catalog of a library was burned down, but the books are still on the shelves.
Furthermore, attributing this solely to "pulling the drive out early" glosses over the systemic vulnerability of proprietary, non-journaling or poorly implemented file systems on cheap flash controller logic. If OP was using exFAT without proper sync flags, atomic writes are non-existent.
OP, this is exactly why FAT-based derivatives are ticking time bombs for critical data. You should have been using a local Git repository or at least a journaling file system, though Windows' handling of block devices with corrupted magic numbers is notoriously incompetent anyway.