git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem setting up a shared git repository
@ 2013-09-05 21:43 Eyal Zinder
  2013-09-06  7:43 ` Johannes Sixt
  2013-09-06 10:06 ` Konstantin Khomoutov
  0 siblings, 2 replies; 3+ messages in thread
From: Eyal Zinder @ 2013-09-05 21:43 UTC (permalink / raw)
  To: git@vger.kernel.org

I hope it's not too inappropriate to send a random question your way, but I've exhausted all other means and am quite lost at the moment.. 

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  

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.. 

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.. 

I'm completely lost at the moment.. I try to set --git-dir or --work-tree and I get mixed results.. either the setting is not allowed when working in bare repositories, or I can't run certain operations from the work-tree and git-dir.. like "git status", which in a split git-dir / work-tree environment (on windows), returns an error which specifies the operation is invalid in a bare repository, or specifies that the work-tree is not recognized as a repository... :( 

Please help me.. 
I'm new to Git, but love it already.. I would hate it if I had to work without it.. 

Thank you in advance for all your help!


- Eyal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem setting up a shared git repository
  2013-09-05 21:43 Problem setting up a shared git repository Eyal Zinder
@ 2013-09-06  7:43 ` Johannes Sixt
  2013-09-06 10:06 ` Konstantin Khomoutov
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Sixt @ 2013-09-06  7:43 UTC (permalink / raw)
  To: Eyal Zinder; +Cc: git@vger.kernel.org

Am 9/5/2013 23:43, schrieb Eyal Zinder:
> 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.

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem setting up a shared git repository
  2013-09-05 21:43 Problem setting up a shared git repository Eyal Zinder
  2013-09-06  7:43 ` Johannes Sixt
@ 2013-09-06 10:06 ` Konstantin Khomoutov
  1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Khomoutov @ 2013-09-06 10:06 UTC (permalink / raw)
  To: Eyal Zinder; +Cc: git@vger.kernel.org

On Thu, 5 Sep 2013 14:43:52 -0700 (PDT)
Eyal Zinder <ezinder@yahoo.com> wrote:

[...]
> 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..
[...]

Did Git tell you the push failed because of "non-fast-forward update"?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-06 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 21:43 Problem setting up a shared git repository Eyal Zinder
2013-09-06  7:43 ` Johannes Sixt
2013-09-06 10:06 ` Konstantin Khomoutov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).