Why, because it is difficult to work and edit code via legacy editors in the guest. The whole purpose of vagrant is to be more easily for the developer, right:)?
As such I please someone to guide me in this situation:
- Need to work on a project. It is git repo. Requires mysql, php, etc, etc.
- VM works great(provided)
- But editing files in this repo not so easy via ssh and "legacy" editors. Want to use favorite IDE.
On the VM repo is in /home/vagrant/src
.
I want it to be visible/editable in ../src
in the host.
I read the docs and putted this in the Vagranfile:
config.vm.synced_folder '../src', '/home/vagrant/src'
This "works" except that it overwrites all contents from /home/vagrant/src
with those from ../src
which is empty.
Any workaround? I considered the possibility to clone the repo via git(publicly available via github) and sync the folder to the VM but this does not feel right and lose production configs too.