Does Git generally choke on mounted drives? Or just Git GUI's?

孤街醉人 提交于 2019-12-01 04:28:32
DasKrümelmonster

It is git in general. This answer suggests, it is because of the filelocking. For more info, just search SO for "git samba"

From my experience, operating on a non-bare repo on a network drive is a bad idea.

For best-practises: http://git-scm.com/book/ch4-1.html

So either:

  1. Setup an SSH server on you NAS and push/pull to that
  2. Map your network share (as you have now) but put a bare repo on that. Then, push/pull to that one.

In any case it is recommended that the git repo with the working copy resides on a local disk.

After a lot of wasted time I've come to the following solution:

On the Synology NAS server:

control panel -> File Sharing and Priviledges -> Win/Mac/NFS -> Mac File Service -> Apply Default Unix Permissions - Check this box and restart the file service.

Red herrings - stuff I tried an it didn't work.

a) change the Git set up from using the NAS system directly to using Git Server via ssh. b) using/not using Sourcetree for git access c) probably a dozen other things.

Note that the problem is not related to the Git setup but rather to the location of the directory where the check out occurs. without checking the box above, I couldn't change permissions or ownership on the index file even through the Terminal - though I should do it through SSH.

Robert Ramey

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!