Running 'git clean -fd' or 'git clean -fx' works properly (i.e., errorlevel is 0 at the end of the execution) Seems to only happen with certain (large) repositories