I've posted the question on stackoverflow, but maybe askubuntu is more proper
I'm using Ubuntu 22.04 (Linux-to-go) and Windows 10 on my desktop.Everything was working fine until I reinstalled Windows 10 on a new SSD (because my previous system SSD had developed bad blocks).
The Git repository in question is located on a separate SSD that both Ubuntu and Windows can access. The file system on the SSD is NTFS.
situations
The first time:I left some changes uncommitted in the repository before shutting down Ubuntu and rebooting into Windows.When I checked the repository in Windows, I encountered this error:
$ git statuserror:bad signature x00000000fatal: index file corrupt
(I managed to fix it by deleting the .git/index file and restoring it.)Also,I noticed other strange behavior, such as one of my .md
files being completely corrupted(its content was replaced with something resembling binary data).Windows 10 also reported an issue with the drive, though I'm a bit fuzzy on the details.
The second time:I was more careful and committed all changes before switching to Windows. However, this time I got a different error:
$ git statusfatal: bad object HEAD
problems
What could be causing these issues? It's frustrating not being able to manage projects smoothly across the two operating systems.
Thanks!