The Git issue is described in details here.
I'm on OS X 10.6.5, working on the project that runs only on Ubuntu.
I run Ubuntu 10开发者_开发技巧.10 x86 as a guest in VMWare Fusion 3.1.2.
My work is in ~/projects/
on OS X. I mount the projects
directory in the Ubuntu guest via VMWare's hgfs: /mnt/hgfs/projects
.
In Ubuntu I symlink /mnt/hgfs/projects
to ~/projects
.
As a part of my workflow I have to run a script that does
(cd /absolute/path/to/project/ && git add /absolute/path/to/project/some/file)
Due to the above issue the script does not work. I need to workaround this somehow.
What should be left as is:
- My files must be on OS X, in
~/projects
. I have other non-Ubuntu stuff there, and I'd hate to keep track of several directories on several OSes. Also, I should be able to edit my files in my favorite OS X-only editor. - Files must be instantly synchronized between Ubuntu and OS X. I should not wait and I should not run anything by hand.
- I do not want to change the script.
- I'd like files in Ubuntu to stay in
~/projects
.
I guess that, given these requirements, my options are not that numerous.
The one I see is to mount the OS X ~/projects
to Ubuntu ~/projects
directly.
The question is, what is the most robust way to do it? Last time I looked, SSHFS and NFS support in OS X was flaky (but perhaps I did not look that well).
Is there a way to change hgfs mount point?
Easy:
rm ${HOME}/projects # Remove symlink
mkdir ${HOME}/projects
sudo mount -t vmhgfs .host:/projects "${HOME}/projects"
精彩评论