2

We have a development server with a GIT repository (with a working directory).

The access to work with it from a given workstation is via a network unit mounted with sshfs. So basically I was directly working on this repo so far.

What we want now is to clone it within every workstation, and push to it whenever needed, in order to test any change. So we need to keep the remote (development server) with its working directory, not a bare repository.

From what I remember, when I cloned a remote repo, I wasn't able to push to it because it had a working directory. So how should I proceed?

luis.ap.uyen
  • 1,314
  • 1
  • 11
  • 29
  • 1
    This sounds like a synchronization disaster waiting to happen. – apokryfos Feb 21 '17 at 16:43
  • @smarber Thanks for pointing me to that post. I think it's what I need. – luis.ap.uyen Feb 21 '17 at 16:52
  • @apokryfos Although I do not agree with having a non bare repository server whose working tree is used for demo, I do not think a such way will necessarly lead to a disaster. – smarber Feb 21 '17 at 16:52
  • @apokryfos Why you say that? Once cloned, the working directory in the development server (I mistook it for "production", sorry) wouldn't be edited directly. – luis.ap.uyen Feb 21 '17 at 16:56
  • As far as I know cloning a repo disassociates the clone from the original repo so if you push something to one of the cloned repos you're not guaranteed to be able to also push the change to the original repo as well. – apokryfos Feb 21 '17 at 16:59
  • Git is by definition de-centralized. Hence the classification into 'Distributed' VCS as opposed to 'Centralised' VCS. – TheGeorgeous Feb 22 '17 at 06:43

0 Answers0