Git checkout and reset on Windows occasionally shows random files have changed

前端 未结 5 499
清歌不尽
清歌不尽 2020-12-16 21:46

Often when I do a checkout of a different branch, or a reset, I will get \'permission denied\' errors from windows for one to a dozen files - but the particular files vary f

相关标签:
5条回答
  • 2020-12-16 22:29

    It might be the Windows Search Indexer, which tries do index files as they are created. I ran into this issue with svn checkout and had to exclude that directory from indexing before I could successfully checkout a full project.

    0 讨论(0)
  • 2020-12-16 22:33

    You could try Filemon from sys internals

    0 讨论(0)
  • 2020-12-16 22:34

    You can begin with a:

     GIT_TRACE=1
    

    But it may not display much more than your original message regarding this file.

    The usual cause is some opened editor which wants to reload the files when changed, and that can conflict with git's file manipulations.
    That means: the usual strategy is to repeat your git command after having close as many other applications as you can.

    I haven't found anyone describing similar behavior

    See this thread for instance, ot this one, both on Cygwin.
    What version of Git are you using (Git on Cygwin, or MSysGit, in a Cygwin session or a Dos session?)

    0 讨论(0)
  • 2020-12-16 22:43

    See my post https://connect.microsoft.com/VisualStudio/feedback/details/676699/cannot-open-linker-output-for-writing-or-cannot-close-file

    Not git related!

    Sysinternals' process monitor reveals that Windows explorer interferes with newly created files, perhaps due to some plugin or what, but it happens.

    0 讨论(0)
  • 2020-12-16 22:43

    Disabling UAC Virtualization seems to have fixed the problem.

    See http://code.google.com/p/msysgit/issues/detail?id=320

    0 讨论(0)
提交回复
热议问题