title: Git: fatal: fsync error on 'sha1 file': Bad file descriptor
body: <p>I'm using VS Code with Git - it's in portable location C:\_DEV\bin\git and is also added to Windows PATH so it works just fine with no remotes.</p>
  
  <p>I have a OneDrive <em>_GIT</em> folder where I have some of my "remote" repositories, that sync between 2 devices (sometimes, I have it there mainly for backup purposes).</p>
  
  <p>The error appears when I want to commit changes, only way to "fix" this issue is to restart the computer, so I'd like to find a way how to fix it properly. The problem is, it doesn't appear always and not for all repositories, it's pretty random.</p>
  
  <p>I think it's because of sync from/to OneDrive. Is there a command I can run to fix the file descriptor? Or other way to prevent it?</p>
  
  <pre><code>git remote --verbose
  git ls-tree -l HEAD -- a:\new\theme\assets\sass\main.scss
  git show 97a333c5e7fce816dbb46a5c1235d69e61836726
  git show HEAD:theme/assets/sass/main.scss
  git add -A -- a:\new\theme\assets\sass\main.scss
  fatal: fsync error on 'sha1 file': Bad file descriptor
  </code></pre>