osx - git status does not work properly with Virtualbox Shared Folders -


details

  • host machine: macos sierra
  • guest machine: ubuntu 64bits 16.04 lts
  • virtualbox: 5.1.14

on host repository local now. initialized , have several [local] commits without single push remote.

symptoms

on host machine have parent folder git repository on it. have shared parent folder guest machine, after login on vm folder in /media/sf_parent.

in terminal cd /media/sf_parent @ moment content seems shared. when change repo folder tried git status , output single file in repository tracked modified.

the strange part git log delivers last commit have made on host. tried visually compare both "versions" of repository folder ls , same value "update date" , "file size" have different values "owner", "group" , "permissions".


what problem?

maybe virtualbox somehow not support this?

might conflict on filesystem level "owner" , "permissions"?

linux user administration problem. vm doesn't know what/who group/users host machine , vice/versa. can fixed using separate authentication servers user accounts answer out of scope stackoverflow.

one git way fix host bare repository on shared folder , clone locally vm. push/pull changes necessary

from host

cd shared/folder mkdir <repo name>.git    #.git isn't needed typical cd <repo name>.git git init --bare  cd <current repo location> git remote add origin <path repo.git folder> git push --all 

from vm

cd ~ git clone <path shared folder bare repo.git> 

be sure set username , email address when on vm commits attributed correct people (using git config)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -