Search code examples
c++gitvisual-studiovirtual-machinesamba

Visual Studio doesn't notify me of file change when pulling from GIT repository (using samba)


I am developing code for a c++ project at work. We have windows boxes that run linux VM's where our files are stored and where we do builds. I use Visual Studio 2012 as my IDE which accesses my files accross a samba share to the VM. We recently switched to using GIT.

The problem I am seeing is that when I do a GIT pull and a file changes that I have open in Visual Studio changes, I am not notified of the change in Visual Studio.

We recently switched to GIT from an older product called Accurev. With accurev (also running on the linux VM) I was notified in Visual Studio when files changed.

I've compared how each works, and both Accurev and GIT changed the files date created and date modified to be the time of the pull.

Any ideas as to what GIT is doing differently and/or how to fix this?


Solution

  • This is really strange as modification detection is independent on what changed the file, the FS either can or can't report it. Are you sure you didn't change some settings in VS or with drive mapping?

    OTOH I find your method weird. If you use git, why have the checkout on a share? Clone it ot a local disk or even a ramdrive -- that mitigates the change problem and you gain huge speedup in compile and search operations. All the fine git tools work on windows -- install GitExtensions that comes with msysgit, possibly also Git source provider. That integrate into VS. And the push/pull is the same.

    It's fine if the parent repo sits on the samba share.