title: Frequent errors running TFS-2013 with git
body: <p>We have TFS-2013 configured to use a git repository. All works fine most of the time but we are getting intermittent build errors - they even seem to become more frequent over time.</p>
  
  <p>This is what we can find in the build logs when the problem occurs:</p>
  
  <blockquote>
    <p>Exception Message: An error was raised by libgit2. Category = Os
    (Error).</p>
    
    <p>Could not remove directory. File
    'C:/Builds/1/MyTool/MyTool_CI/src/.git/objects/pack/pack_git2_a02380'
    cannot be removed: The process cannot access the file because it is
    being used by another process.</p>
    
    <p>(type LibGit2SharpException)</p>
    
    <p>Exception Data Dictionary:</p>
    
    <p>libgit2.code = -1</p>
    
    <p>libgit2.category = 1</p>
  </blockquote>
  
  <p>What could cause these errors..?</p>