Forum Discussion
OneDrive is corrupting my Git repositories
Hello, after a Windows 11 update (in 09/09/2023) my Git repositories in OneDrive folder were corrupted. I don't know exactly what file was damaged, but just after OneDrive finnishes syncing the .git folder, it becomes invalid for Git. When I try to access it I get the following message:
Could not initialize libgit. libgit reports: not a git repository (or any of the parent directories): .git
If I create a new repository off OneDrive folder, no problem happens, so I'm pretty sure this is happening because OneDrive.
If I create a Git repository in a OneDrive folder in another computer running Windows 10, the repository works fine until the moment I access it in my computer with the recentply updated Windows 11. This is another evidence that the update introduced a bug in OneDrive.
Did anybody else experienced this issue? How to fix it?
Best regards!
Alex
- AlexSConstancioCopper Contributor
Hello Mike Williams,
Thanks for the attempt, but not helpful for the scenario I posted (Git repository in a OneDrive folder after the 08-09-2023 Windows 11 update).
Best regards,
Alex
- diame97Copper Contributor
AlexSConstancio Hi Alex! The same is happening to me right now, with the difference that I'm using a PC with Windows 10, and it happens anyway (maybe it's a bug in OneDrive more than in Windows?). Also I've been using the OneDrive folder for my github repositories since this year, and I see that your post is from 2023. I don't know if it's exactly the same bug. Were you able to solve it somehow? I'm still looking for a solution 😥