{"thread":{"id":"34858","subject":"Problem setting up a shared git repository","startedAt":"2013-09-05T21:43:52Z","lastAt":"2013-09-06T10:06:33Z","messageCount":3,"participants":["Eyal Zinder","Johannes Sixt","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"226886","messageId":"1378417432.91149.YahooMailNeo@web161803.mail.bf1.yahoo.com","threadId":"34858","inReplyTo":null,"subject":"Problem setting up a shared git repository","fromName":"Eyal Zinder","fromEmail":"ezinder@yahoo.com","sentAt":"2013-09-05T21:43:52Z","receivedAt":"2013-09-05T21:43:52Z","isPatch":false,"sender":{"key":"ezinder@yahoo.com","avatar":null},"body":"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.. \n\nI'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.  \n\nThe 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.  \n\nI 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: \ngit clone f:\\GitDBs\\foo.git foo  \n\nI 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.. \n\nThe 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.. \n\nI'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... :( \n\nPlease help me.. \nI'm new to Git, but love it already.. I would hate it if I had to work without it.. \n\nThank you in advance for all your help!\n\n\n- Eyal\n"},{"id":"226919","messageId":"522987A4.1090702@viscovery.net","threadId":"34858","inReplyTo":"1378417432.91149.YahooMailNeo@web161803.mail.bf1.yahoo.com","subject":"Re: Problem setting up a shared git repository","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2013-09-06T07:43:32Z","receivedAt":"2013-09-06T07:43:32Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 9/5/2013 23:43, schrieb Eyal Zinder:\n> I'm trying to setup a distributed development repository with a central\n> repository acting as the production copy.  I'm doing so on a Windows\n> file share with no SSH / HTTP accessibility.  Basically each developer\n> will have their own copy of the project, and the shared drive should\n> have a copy of the master copy (prod/master branch), along with the\n> work-tree files.\n> \n> The idea is that any developer should be able to do independent\n> development, staged commits, etc.. then push to the central (origin)\n> repository, and production scripts will reflect these changes upon a\n> push.\n> \n> I got pretty close to this setup by creating a bare repository on the\n> file share server (f:\\GitDBs\\foo.git), then cloning the bare repository\n> onto the production path like so: git clone f:\\GitDBs\\foo.git foo\n\nThe setup sounds reasonable.\n\n> I cloned the bare repository just the same onto my local dev path.. and\n> proceeded with development. This worked fine, and I was able to push /\n> pull changes into \"origin\" (bare repo), and then I would go to my prod\n> (f:\\foo) repository (clone of bare f:\\GitDBs\\foo.git), then pull the\n> changes..\n\nSo far my understanding is that your production directory only ever issues\npulls from the bare repository. That is OK.\n\n> The problem I faced later on was in parallel development, when changes\n> were made to a file in one repository, and at the same time other\n> changes made to the same file in another repository..  I couldh't push\n> changes from the dev\\foo to prod\\foo or to origin..\n\nDefine \"couldn't push\". What are the error messages? Is it important that\nit is *the same file* to which changes were made at the same time?\n\nDo you have receive.denyNonFastForwards set in the bare repository?\n\n> I'm completely lost at the moment.. I try to set --git-dir or\n> --work-tree and I get mixed results..\n\nDon't do that, it should not be necessary in your setup.\n\n-- Hannes\n"},{"id":"226922","messageId":"20130906140633.8b113079bf45e8a5307a1d11@domain007.com","threadId":"34858","inReplyTo":"1378417432.91149.YahooMailNeo@web161803.mail.bf1.yahoo.com","subject":"Re: Problem setting up a shared git repository","fromName":"Konstantin Khomoutov","fromEmail":"flatworm@users.sourceforge.net","sentAt":"2013-09-06T10:06:33Z","receivedAt":"2013-09-06T10:06:33Z","isPatch":false,"sender":{"key":"flatworm@users.sourceforge.net","avatar":null},"body":"On Thu, 5 Sep 2013 14:43:52 -0700 (PDT)\nEyal Zinder <ezinder@yahoo.com> wrote:\n\n[...]\n> The problem I faced later on was in parallel development, when\n> changes were made to a file in one repository, and at the same time\n> other changes made to the same file in another repository..  I\n> couldh't push changes from the dev\\foo to prod\\foo or to origin..\n[...]\n\nDid Git tell you the push failed because of \"non-fast-forward update\"?\n"}]}