{"thread":{"id":"29860","subject":"git push from client is not updating files on server","startedAt":"2012-03-06T16:52:11Z","lastAt":"2012-03-30T18:23:02Z","messageCount":15,"participants":["Jerome Yanga","Ben Tebulin","Junio C Hamano","Neal Kreitzinger","Holger Hellmuth"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"186227","messageId":"CAC0z1F-bGikXZtLnd8d=3G+4okvNqZaxyrLjh4G3YzPpmqyxQA@mail.gmail.com","threadId":"29860","inReplyTo":null,"subject":"git push from client is not updating files on server","fromName":"Jerome Yanga","fromEmail":"jerome.yanga@gmail.com","sentAt":"2012-03-06T16:52:11Z","receivedAt":"2012-03-06T16:52:11Z","isPatch":false,"sender":{"key":"jerome.yanga@gmail.com","avatar":null},"body":"My main objective is to create a central public Git server.  I had\nfollowed the instructions in the URL below to make it public.\n\nhttp://book.git-scm.com/4_setting_up_a_public_repository.html\n\n>From the git client server, I can successfully clone projects in from\nthe central public Git server using the command below.\n\ngit clone http://<hostname_of_central_public_git_server>/<Project_name>.git\n\nMy push seems to be successful too using the command below as I get\nthe message \"Everything up-to-date\".\n\ngit push\n\nHowever, when I log into the central public Git server and look at the\nfiles in the project, none of them have change.  I can only see the\nchanges from the client via Gitweb.\n\nHelp.\n\nRegards,\nj\n"},{"id":"186229","messageId":"jj5ih2$f0m$1@dough.gmane.org","threadId":"29860","inReplyTo":"CAC0z1F-bGikXZtLnd8d=3G+4okvNqZaxyrLjh4G3YzPpmqyxQA@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Ben Tebulin","fromEmail":"nntp.20.jexpert@spamgourmet.com","sentAt":"2012-03-06T17:46:26Z","receivedAt":"2012-03-06T17:46:26Z","isPatch":false,"sender":{"key":"nntp.20.jexpert@spamgourmet.com","avatar":null},"body":"You can only push to \"bare-only repositories\". These do not contain a \nworking tree but only a .git directory.\n\nYou can only see changes changes in Git repository on the file system if \nyou clone & pull this bare-only repository to a regular repository.\n\nIt seems you looking for the wrong thing in the wrong place...\n\nAm 06.03.2012 17:52, schrieb Jerome Yanga:\n> My main objective is to create a central public Git server.\n > [...]\n> However, when I log into the central public Git server and look at the\n> files in the project, none of them have change.  I can only see the\n> changes from the client via Gitweb.\n"},{"id":"186241","messageId":"7vsjhlsetn.fsf@alter.siamese.dyndns.org","threadId":"29860","inReplyTo":"jj5ih2$f0m$1@dough.gmane.org","subject":"Re: git push from client is not updating files on server","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-03-06T19:35:16Z","receivedAt":"2012-03-06T19:35:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"[jc: resurrected JY as recipient]\n\nBen Tebulin <nntp.20.jexpert@spamgourmet.com> writes:\n\n> You can only push to \"bare-only repositories\". These do not contain a\n> working tree but only a .git directory.\n\nThat's a bit too strong. You do not have to limit your \"push\" into\n\"bare repositories\" (drop \"-only\", there is no such word), but it is\nperfectly fine to use \"push\" as a way to emulate a \"fetch\" that you\nwould wish you could but you cannot in the opposite direction.\n\nWhat \"push\" does not do is to touch the working tree, and this is\nintuitively understandable once you realize that \"push\" is an\nopposite of \"fetch\".\n\n> My push seems to be successful too using the command below as I get\n> the message \"Everything up-to-date\".\n> \n> git push\n\nIt is somewhat strange that this _succeeded_.\n\nWhen pushing into a repository with a working tree (i.e. \"a non-bare\nrepository\") and especially when trying to update its current branch\nwith such a push, \"git push\" would by default be refused, unless you\ntweak a configuration variable or two on the receiving end.  That is\nan expert feature and I do not think that is being in use in this\nparticular scenario, so perhaps the push did _not_ succeed to update\nthe branch Jerome thought it updated, but instead updated a branch\nthat is _not_ the one that is checked out in the repository on the\nreceiving end of this push.\n"},{"id":"186250","messageId":"7vzkbtqxdo.fsf@alter.siamese.dyndns.org","threadId":"29860","inReplyTo":"CAC0z1F-Eg2DOLvd3aA5XCoEJjj1jC=VWVkTA+uc24=18h3pN7g@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-03-06T20:37:23Z","receivedAt":"2012-03-06T20:37:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jerome Yanga <jerome.yanga@gmail.com> writes:\n\n[jc: kicking the thread back to the list; I do not give free\nconsultation in private, but I do not mind answering questions in\npublic to help wider audience.]\n\n> Thank you for the prompt response.\n>\n> The projects in the Apache DocumentRoot are bare repositories.  I\n> think this is what allowed me to push at least this is how I\n> understood it from the URL I had quoted in my last message.\n>\n> If I understood what you had said about push being the opposite of\n> fetch, then it is understandable that the files on the working\n> directory did not get updated and that it only shows in the Gitweb\n> interface.\n>\n> So how do I make the changes go in the working tree?\n\nBy arranging a \"checkout\" to happen when you want to.  One common\nway people seem to do this is to have \"git reset --hard HEAD\" in\npost update hook when the push came to the current branch, assuming\nthat nobody but the update in response to \"push\" is expected to\ntouch the working tree of the receiving repository.\n"},{"id":"186256","messageId":"4F567DC6.4070903@gmail.com","threadId":"29860","inReplyTo":"CAC0z1F-bGikXZtLnd8d=3G+4okvNqZaxyrLjh4G3YzPpmqyxQA@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-06T21:12:38Z","receivedAt":"2012-03-06T21:12:38Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/6/2012 10:52 AM, Jerome Yanga wrote:\n> My main objective is to create a central public Git server.  I had\n> followed the instructions in the URL below to make it public.\n>\n> http://book.git-scm.com/4_setting_up_a_public_repository.html\n>\n> From the git client server, I can successfully clone projects in\n> from the central public Git server using the command below.\n>\n> git clone\n> http://<hostname_of_central_public_git_server>/<Project_name>.git\n>\n> My push seems to be successful too using the command below as I get\n> the message \"Everything up-to-date\".\n>\n> git push\n>\n> However, when I log into the central public Git server and look at\n> the files in the project, none of them have change.  I can only see\n> the changes from the client via Gitweb.\n>\nGitweb and gitk know how to look at .git (bare) repo and display the \ncontents.  (I use gitk to verify that a push did what I wanted.)  There \nis no work-tree for a .git repo to do linux \"ls\" on.  If you really want \nto use commandline you would have to use git commands like git-show, \ngit-ls-files, git-cat-file, git-log, etc., to display and interrogate \nthe contents of git objects (tags, commits, trees, blobs) in a .git repo.\n\nI suspect reviewing it in gitweb is sufficient to verify that the push \ndid what you wanted.  (I don't use gitwet, yet.)\n\nv/r,\nneal\n"},{"id":"186260","messageId":"4F567FEF.5000105@gmail.com","threadId":"29860","inReplyTo":"4F567DC6.4070903@gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-06T21:21:51Z","receivedAt":"2012-03-06T21:21:51Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/6/2012 3:12 PM, Neal Kreitzinger wrote:\n> On 3/6/2012 10:52 AM, Jerome Yanga wrote:\n>>\n>> However, when I log into the central public Git server and look at\n>> the files in the project, none of them have change. I can only see\n>> the changes from the client via Gitweb.\n>>\n> Gitweb and gitk know how to look at .git (bare) repo and display the\n> contents. (I use gitk to verify that a push did what I wanted.) There is\n> no work-tree for a .git repo to do linux \"ls\" on. If you really want to\n> use commandline you would have to use git commands like git-show,\n> git-ls-files, git-cat-file, git-log, etc., to display and interrogate\n> the contents of git objects (tags, commits, trees, blobs) in a .git repo.\n\nscratch git-ls-files from that list.  Its not much use for bare repos, \neither.\n\nv/r,\nneal\n"},{"id":"186275","messageId":"CAC0z1F87ORZQmrZeMGo2suV1fAt-5mAwwpkkV3ZTx0US3AjM8Q@mail.gmail.com","threadId":"29860","inReplyTo":"CAC0z1F_LYRkReO1qqcjkWy6Vb3E0_oNo-0kSf15nGfQFAtXpdg@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Jerome Yanga","fromEmail":"jerome.yanga@gmail.com","sentAt":"2012-03-06T23:07:18Z","receivedAt":"2012-03-06T23:07:18Z","isPatch":false,"sender":{"key":"jerome.yanga@gmail.com","avatar":null},"body":"Is there a way to make git write to the working directory of the\ncentral public server?\n\nPlease be nice to the newbee.  I am merely learning Git.\n\nRegards,\nj\n\nOn Tue, Mar 6, 2012 at 3:05 PM, Jerome Yanga <jerome.yanga@gmail.com> wrote:\n> Please be nice to the newbee.  I am merely learning Git.\n>\n> Regards,\n> j\n>\n> On Tue, Mar 6, 2012 at 3:02 PM, Jerome Yanga <jerome.yanga@gmail.com> wrote:\n>> Is there a way to make git write to the working directory of the\n>> central public server?\n>>\n>> Regards,\n>> j\n>>\n>> On Tue, Mar 6, 2012 at 1:21 PM, Neal Kreitzinger <nkreitzinger@gmail.com> wrote:\n>>> On 3/6/2012 3:12 PM, Neal Kreitzinger wrote:\n>>>>\n>>>> On 3/6/2012 10:52 AM, Jerome Yanga wrote:\n>>>>>\n>>>>>\n>>>>> However, when I log into the central public Git server and look at\n>>>>> the files in the project, none of them have change. I can only see\n>>>>> the changes from the client via Gitweb.\n>>>>>\n>>>> Gitweb and gitk know how to look at .git (bare) repo and display the\n>>>> contents. (I use gitk to verify that a push did what I wanted.) There is\n>>>> no work-tree for a .git repo to do linux \"ls\" on. If you really want to\n>>>> use commandline you would have to use git commands like git-show,\n>>>> git-ls-files, git-cat-file, git-log, etc., to display and interrogate\n>>>> the contents of git objects (tags, commits, trees, blobs) in a .git repo.\n>>>\n>>>\n>>> scratch git-ls-files from that list.  Its not much use for bare repos,\n>>> either.\n>>>\n>>> v/r,\n>>> neal\n"},{"id":"186278","messageId":"4F569EA8.4050907@gmail.com","threadId":"29860","inReplyTo":"CAC0z1F87ORZQmrZeMGo2suV1fAt-5mAwwpkkV3ZTx0US3AjM8Q@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-06T23:32:56Z","receivedAt":"2012-03-06T23:32:56Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/6/2012 5:07 PM, Jerome Yanga wrote:\n> Is there a way to make git write to the working directory of the\n> central public server?\n>\nIn your original post you stated:\n\n > From the git client server, I can successfully clone projects in from\n > the central public Git server using the command below.\n >\n > git clone \nhttp://<hostname_of_central_public_git_server>/<Project_name>.git\n\n\".git\" extension implies \"bare\" repo.  A bare repo has _no_ working \ntree.  Is the repo in question bare or non-bare?  If you are not sure, \nthen cd to the central-repo-dir (ie., the <Project_name>.git you cloned \n_from_ in your example above) and run \"git config -l |grep bare\".  If it \nsays \"core.bare=true\" then it is a bare repo.\n\nv/r,\nneal\n"},{"id":"186281","messageId":"CAC0z1F9sBYCuv_HMCx1ryWLvxZKUcLPS1UUj80ihEesje+SKzg@mail.gmail.com","threadId":"29860","inReplyTo":"4F569EA8.4050907@gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Jerome Yanga","fromEmail":"jerome.yanga@gmail.com","sentAt":"2012-03-07T00:28:06Z","receivedAt":"2012-03-07T00:28:06Z","isPatch":false,"sender":{"key":"jerome.yanga@gmail.com","avatar":null},"body":"The project in Apache's DocumentRoot was created using the following command:\n\n\"cd /var/www/git\ngit clone --bare <non-bare working directory> <project>.git\"\n\nHence, I believe that is is bare.  Besides, it does not have .git\nfolder.  I assumed that when I did this that the non-bare directory\nwill also be updated when a push is performed via http.\n\nMy objective is that I would like the developers to be able to push\nvia http and these pushes will need to be reflected on the non-bare\nworking directory as these directories will be used for automated\ntests.\n\nIs what I am trying to do even possible?  If so, please share with me a guide.\n\nThank you in advance.\n\nRegards,\nj\n\nOn Tue, Mar 6, 2012 at 3:32 PM, Neal Kreitzinger <nkreitzinger@gmail.com> wrote:\n> On 3/6/2012 5:07 PM, Jerome Yanga wrote:\n>>\n>> Is there a way to make git write to the working directory of the\n>> central public server?\n>>\n> In your original post you stated:\n>\n>\n>> From the git client server, I can successfully clone projects in from\n>> the central public Git server using the command below.\n>>\n>> git clone\n>> http://<hostname_of_central_public_git_server>/<Project_name>.git\n>\n> \".git\" extension implies \"bare\" repo.  A bare repo has _no_ working tree.\n>  Is the repo in question bare or non-bare?  If you are not sure, then cd to\n> the central-repo-dir (ie., the <Project_name>.git you cloned _from_ in your\n> example above) and run \"git config -l |grep bare\".  If it says\n> \"core.bare=true\" then it is a bare repo.\n>\n> v/r,\n> neal\n"},{"id":"186282","messageId":"4F56B5B0.5040204@gmail.com","threadId":"29860","inReplyTo":"CAC0z1F9sBYCuv_HMCx1ryWLvxZKUcLPS1UUj80ihEesje+SKzg@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-07T01:11:12Z","receivedAt":"2012-03-07T01:11:12Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/6/2012 6:28 PM, Jerome Yanga wrote:\n> The project in Apache's DocumentRoot was created using the following command:\n>\n> \"cd /var/www/git\n> git clone --bare<non-bare working directory>  <project>.git\"\n>\nI have a comment on the above command.  Did you run:\n\ngit clone --bare /non-bare/working/directory project.git\n\n(or)\n\ngit clone --bare file:///non-bare/working/directory project.git\n\nbecause the former does hardlinks and the latter does a full copy (see \ngit-clone manpage section \"GIT URLS\").  I'm not sure how much it \nmatters, but you should confirm whether what you did is what you want.\n\nv/r,\nneal\n"},{"id":"186283","messageId":"7vpqcpp2s9.fsf@alter.siamese.dyndns.org","threadId":"29860","inReplyTo":"CAC0z1F9sBYCuv_HMCx1ryWLvxZKUcLPS1UUj80ihEesje+SKzg@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-03-07T02:23:34Z","receivedAt":"2012-03-07T02:23:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jerome Yanga <jerome.yanga@gmail.com> writes:\n\n> The project in Apache's DocumentRoot was created using the following command:\n>\n> \"cd /var/www/git\n> git clone --bare <non-bare working directory> <project>.git\"\n>\n> Hence, I believe that is is bare.  Besides, it does not have .git\n> folder.  I assumed that when I did this that the non-bare directory\n> will also be updated when a push is performed via http.\n>\n> My objective is that I would like the developers to be able to push\n> via http and these pushes will need to be reflected on the non-bare\n> working directory as these directories will be used for automated\n> tests.\n\nSo that <non-bare working directory> above is what you want to be\nupdated when you update <project>.git?\n\nMore concretely, for example, you have say /srv/project/frotz and\n/var/www/git/frotz.git directories on that server.  Perhaps the\nproject may have started in the former:\n\n\tmkdir -p /srv/project/frotz\n        cd /srv/project/frotz\n        git init\n        ... populate with the sources ...\n        git add ...\n        git commit\n\nand then cloned to the other one\n\n\tcd /var/www/git && git clone --bare /srv/project/frotz frotz.git\n\nI'll assume that is more or less the set-up you have.\n\nNow, it depends on how the push goes to the latter one (I do not\nremember offhand if pushing over dumb http transport triggers\nhooks), but in general, you would install a post-update hook (read\ngithooks manual page) in the latter repository, that gets triggered\nwhen it receives a push.  The hook could do something like this:\n\n\t#!/bin/sh\n        unset GIT_DIR\n        cd /srv/project/frotz &&\n        git pull --ff-only /var/www/git/frotz.git master &&\n\t: you can trigger automated test here if you want to &&\n        make test\n\nThe above example goes to the repository with a working tree, pulls\nthe latest change from the repository the user pushed into, and then\nruns the automated test.\n"},{"id":"186284","messageId":"4F56C946.8080601@gmail.com","threadId":"29860","inReplyTo":"CAC0z1F9sBYCuv_HMCx1ryWLvxZKUcLPS1UUj80ihEesje+SKzg@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-07T02:34:46Z","receivedAt":"2012-03-07T02:34:46Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/6/2012 6:28 PM, Jerome Yanga wrote:\n> The project in Apache's DocumentRoot was created using the following command:\n>\n> \"cd /var/www/git\n> git clone --bare<non-bare working directory>  <project>.git\"\n>\n> Hence, I believe that is is bare.  Besides, it does not have .git\n> folder.\n\nThe bare repo is the .git folder.  That's why its called barerepo.git. \n.git = git repo.  worktree/.git = non-bare repo with worktree and .git \nrepo.  barerepo.git = bare repo and no worktree.\n\n> I assumed that when I did this that the non-bare directory\n> will also be updated when a push is performed via http.\n>\nThe non-bare you cloned from is independent.  It doesn't know about the \nbare repo you cloned from it, and your bare repo does not know about the \nnon-bare repo it was cloned from.  I'm not sure what you were doing with \nthat non-bare before you created the bare from it.  You may not need \nthat non-bare anymore if that's all it was for.\n\n> My objective is that I would like the developers to be able to push\n> via http and these pushes will need to be reflected on the non-bare\n> working directory as these directories will be used for automated\n> tests.\n>\nCreate a new non-bare clone of your bare repo.  Then do git-pull on the \nnew non-bare after the bare gets updates (someone does git push to it) \nand you want to test those new commits.  The worktree of the new \nnon-bare clone can be the document root of your testing virtual host, if \nthat's what you're doing.  That way, you know that no one else is \nmessing with new non-bare (test repo) like doing development in it and \nmessing up your tests.\n\nv/r,\nneal\n"},{"id":"186305","messageId":"4F5740AD.9080306@ira.uka.de","threadId":"29860","inReplyTo":"4F56C946.8080601@gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Holger Hellmuth","fromEmail":"hellmuth@ira.uka.de","sentAt":"2012-03-07T11:04:13Z","receivedAt":"2012-03-07T11:04:13Z","isPatch":false,"sender":{"key":"hellmuth@ira.uka.de","avatar":null},"body":"On 07.03.2012 03:34, Neal Kreitzinger wrote:\n> Create a new non-bare clone of your bare repo. Then do git-pull on the\n> new non-bare after the bare gets updates (someone does git push to it)\n> and you want to test those new commits. The worktree of the new non-bare\n> clone can be the document root of your testing virtual host, if that's\n> what you're doing. That way, you know that no one else is messing with\n> new non-bare (test repo) like doing development in it and messing up\n> your tests.\n\nTo expand on Neals method, if you do git fetch (periodically in a cron \njob for example) on the cloned non-bare, 'git log HEAD..origin/HEAD' \nwill have output only if the non-bare has new commits.\n"},{"id":"186319","messageId":"CAC0z1F_hvqmWO5k-3KCbGaEDBf_iadKaqPg0tj3iCrCar2mJ=A@mail.gmail.com","threadId":"29860","inReplyTo":"4F5740AD.9080306@ira.uka.de","subject":"Re: git push from client is not updating files on server","fromName":"Jerome Yanga","fromEmail":"jerome.yanga@gmail.com","sentAt":"2012-03-07T15:43:46Z","receivedAt":"2012-03-07T15:43:46Z","isPatch":false,"sender":{"key":"jerome.yanga@gmail.com","avatar":null},"body":"Thank you all for the recommendations.  I will try them.\n\nI would like to confirm some info.\n\nJunio,\n\nYour assumption of my setup correct.  I shall read on post-update\nhook.  If you have a recommended link for it, please share it.\n\nNeal,\n\nYou are also correct.  My current configuration's reaction to a push\nshows that the bare repo that was cloned from a non-bare repo are\nindependent of each other.  I will also try your recommendation.\n\nHolger,\n\nThank you for explaining what Neal meant.\n\nRegards,\nj\n\nOn Wed, Mar 7, 2012 at 3:04 AM, Holger Hellmuth <hellmuth@ira.uka.de> wrote:\n> On 07.03.2012 03:34, Neal Kreitzinger wrote:\n>>\n>> Create a new non-bare clone of your bare repo. Then do git-pull on the\n>> new non-bare after the bare gets updates (someone does git push to it)\n>> and you want to test those new commits. The worktree of the new non-bare\n>> clone can be the document root of your testing virtual host, if that's\n>> what you're doing. That way, you know that no one else is messing with\n>> new non-bare (test repo) like doing development in it and messing up\n>> your tests.\n>\n>\n> To expand on Neals method, if you do git fetch (periodically in a cron job\n> for example) on the cloned non-bare, 'git log HEAD..origin/HEAD' will have\n> output only if the non-bare has new commits.\n>\n>\n"},{"id":"188184","messageId":"CAC0z1F8jZDr=E9wSGGwd9Ar=5S=DeLJrtZWcPdMRS3OdS1Ozuw@mail.gmail.com","threadId":"29860","inReplyTo":"CAC0z1F_hvqmWO5k-3KCbGaEDBf_iadKaqPg0tj3iCrCar2mJ=A@mail.gmail.com","subject":"Re: git push from client is not updating files on server","fromName":"Jerome Yanga","fromEmail":"jerome.yanga@gmail.com","sentAt":"2012-03-30T18:23:02Z","receivedAt":"2012-03-30T18:23:02Z","isPatch":false,"sender":{"key":"jerome.yanga@gmail.com","avatar":null},"body":"I finally got the chance to implement your suggestions.  I have\ncombined them and am very happy with the outcome.  The missing pieces\nfor being able to push via Apache are as follows:\n\n01)  git config --global http.receivepack true (thanks Junio...found\nthis under githooks)\n02)  chown -R apache:apache /var/www/git\n\nOn the other hand, I have also implemented a non-bare repo for testing\n(thanks Neal and Holger) by cloning the bare repo.\n\nI hope that this helps another.  ;)\n\nRegards,\nj\n\nOn Wed, Mar 7, 2012 at 7:43 AM, Jerome Yanga <jerome.yanga@gmail.com> wrote:\n> Thank you all for the recommendations.  I will try them.\n>\n> I would like to confirm some info.\n>\n> Junio,\n>\n> Your assumption of my setup correct.  I shall read on post-update\n> hook.  If you have a recommended link for it, please share it.\n>\n> Neal,\n>\n> You are also correct.  My current configuration's reaction to a push\n> shows that the bare repo that was cloned from a non-bare repo are\n> independent of each other.  I will also try your recommendation.\n>\n> Holger,\n>\n> Thank you for explaining what Neal meant.\n>\n> Regards,\n> j\n>\n> On Wed, Mar 7, 2012 at 3:04 AM, Holger Hellmuth <hellmuth@ira.uka.de> wrote:\n>> On 07.03.2012 03:34, Neal Kreitzinger wrote:\n>>>\n>>> Create a new non-bare clone of your bare repo. Then do git-pull on the\n>>> new non-bare after the bare gets updates (someone does git push to it)\n>>> and you want to test those new commits. The worktree of the new non-bare\n>>> clone can be the document root of your testing virtual host, if that's\n>>> what you're doing. That way, you know that no one else is messing with\n>>> new non-bare (test repo) like doing development in it and messing up\n>>> your tests.\n>>\n>>\n>> To expand on Neals method, if you do git fetch (periodically in a cron job\n>> for example) on the cloned non-bare, 'git log HEAD..origin/HEAD' will have\n>> output only if the non-bare has new commits.\n>>\n>>\n"}]}