Forum Discussion

AlexSConstancio's avatar
AlexSConstancio
Copper Contributor
Aug 12, 2023

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

Resources