Search code examples
gitnfs

Git implementation with nfs share


I am trying to implement Git in my office. As it is not possible to run apache server on each developer machine, they can't work with clone on their machine. We have a development server with NFS share. I am planing to create git repository and working tree on this NFS share. Git is managed by single user so there will not be any simultaneous push.

My questions are

  1. It is a good practice?
  2. How can i manage user access?

Solution

  • Restating here to make sure I am understanding: a shared development "working area", which everyone mounts over NFS and develops on using their browser pointed at the remote apache instance, they work on the same set of files and execute git commands against the same git working copy. If I'm correct in my understanding so far, that does not sound like a good idea.

    I would recommend you give each developer their own working area on the apache server, and also their own VirtualHost so they can see their independent files. Now they are able to work independently from other developers. Each of those sets of files would be a git clone of the same repository (probably a bare repository somewhere). This allows for a much saner development workflow for each developer, and there is no risk of developers trampling each other and committing other's code, etc.

    User access, you can control this via who is allowed to mount the NFS share.