I seem to remember not so long ago something was posted on HN about a new tool/filesystem built for this scenario. IIRC it was taking advantage of the fact that the VM and Host are on the same disk to get better performance than NFS. But I just can't find that article again.
I know that the standard way is to have the repo in the Host, mounted in the VM via VirtualBox shared folder, but that has its own set of problems. The app running in the VM becomes very slow if it needs to access too many files via shared folder. https://www.jeffgeerling.com/blogs/jeff-geerling/vagrant-nfs-shared-folders