
Ask HN: How do you sync your source tree from the host to the VM? - chadaustin
It seems like syncing source between the host and VM should be a solved problem by now, but I&#x27;ve yet to find something that satisfies all of my use cases.<p>NFS&#x2F;Samba with the source hosted on the host machine means that git&#x2F;search operations inside the VM are slow and don&#x27;t get file change notifications.<p>NFS hosted by the guest prevent Atom and VS Code from using filesystem change events to keep their UI in sync.  Also tools like ag and git are slow.<p>Periodic (or change-triggered) rsync is too high-latency for huge source trees.  Ideally, within 100 ms of saving a source file in your editor, it would be available on the VM.<p>Surely there&#x27;s a tool that, on both the host and the guest, 1) rapidly keeps source trees in sync 2) provides filesystem change events and 3) has great performance and sync latency...  Conflicts aren&#x27;t an issue - they can be be resolved arbitrarily as long as the trees are eventually in sync.<p>What do _you_ do here?
======
implicit
Something I'm working on on the side is a way to run my sandbox in a Docker
container inside a Linux desktop environment without any VM at all.

If I can get this working, my source code will just be a bind mount that's
accessable on both sides of the barrier.

The last major hitch I need to sort out is that our MySQL configuration is
massively slower when run inside a Docker container. I haven't figured out why
yet.

------
smt88
I hate Vagrant, but the rsync-auto command built into Vagrant gives me sub
100ms sync times on a tree of 6,000 files. rsync is fine with the right
settings.

