git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problem setting up a shared git repository

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Sep 6, 2013, 07:43 UTC
Message-ID
<522987A4.1090702@viscovery.net>
In-Reply-To
<1378417432.91149.YahooMailNeo@web161803.mail.bf1.yahoo.com>
Am 9/5/2013 23:43, schrieb Eyal Zinder:
Show 15 quoted lines
> I'm trying to setup a distributed development repository with a central
> repository acting as the production copy.  I'm doing so on a Windows
> file share with no SSH / HTTP accessibility.  Basically each developer
> will have their own copy of the project, and the shared drive should
> have a copy of the master copy (prod/master branch), along with the
> work-tree files.
> 
> The idea is that any developer should be able to do independent
> development, staged commits, etc.. then push to the central (origin)
> repository, and production scripts will reflect these changes upon a
> push.
> 
> I got pretty close to this setup by creating a bare repository on the
> file share server (f:\GitDBs\foo.git), then cloning the bare repository
> onto the production path like so: git clone f:\GitDBs\foo.git foo
The setup sounds reasonable.
Show 5 quoted lines
> I cloned the bare repository just the same onto my local dev path.. and
> proceeded with development. This worked fine, and I was able to push /
> pull changes into "origin" (bare repo), and then I would go to my prod
> (f:\foo) repository (clone of bare f:\GitDBs\foo.git), then pull the
> changes..

So far my understanding is that your production directory only ever issues pulls from the bare repository. That is OK.

> The problem I faced later on was in parallel development, when changes
> were made to a file in one repository, and at the same time other
> changes made to the same file in another repository..  I couldh't push
> changes from the dev\foo to prod\foo or to origin..

Define "couldn't push". What are the error messages? Is it important that it is *the same file* to which changes were made at the same time?

Do you have receive.denyNonFastForwards set in the bare repository?
> I'm completely lost at the moment.. I try to set --git-dir or
> --work-tree and I get mixed results..
Don't do that, it should not be necessary in your setup.
-- Hannes
Previous: Eyal ZinderNext: Konstantin Khomoutov
Message 2 of 3 in “Problem setting up a shared git repository”
  1. Eyal ZinderSep 5, 2013
  2. Johannes SixtSep 6, 2013
  3. Konstantin KhomoutovSep 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.