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

Re: git push from client is not updating files on server

From
JYJerome Yanga <jerome.yanga@gmail.com>
Date
Mar 30, 2012, 18:23 UTC
Message-ID
<CAC0z1F8jZDr=E9wSGGwd9Ar=5S=DeLJrtZWcPdMRS3OdS1Ozuw@mail.gmail.com>
In-Reply-To
<CAC0z1F_hvqmWO5k-3KCbGaEDBf_iadKaqPg0tj3iCrCar2mJ=A@mail.gmail.com>

I finally got the chance to implement your suggestions. I have combined them and am very happy with the outcome. The missing pieces for being able to push via Apache are as follows:

01)  git config --global http.receivepack true (thanks Junio...found
this under githooks)
02)  chown -R apache:apache /var/www/git

On the other hand, I have also implemented a non-bare repo for testing (thanks Neal and Holger) by cloning the bare repo.

I hope that this helps another.  ;)

Regards, j

On Wed, Mar 7, 2012 at 7:43 AM, Jerome Yanga <jerome.yanga@gmail.com> wrote:
Show 39 quoted lines
> Thank you all for the recommendations.  I will try them.
>
> I would like to confirm some info.
>
> Junio,
>
> Your assumption of my setup correct.  I shall read on post-update
> hook.  If you have a recommended link for it, please share it.
>
> Neal,
>
> You are also correct.  My current configuration's reaction to a push
> shows that the bare repo that was cloned from a non-bare repo are
> independent of each other.  I will also try your recommendation.
>
> Holger,
>
> Thank you for explaining what Neal meant.
>
> Regards,
> j
>
> On Wed, Mar 7, 2012 at 3:04 AM, Holger Hellmuth <hellmuth@ira.uka.de> wrote:
>> On 07.03.2012 03:34, Neal Kreitzinger wrote:
>>>
>>> Create a new non-bare clone of your bare repo. Then do git-pull on the
>>> new non-bare after the bare gets updates (someone does git push to it)
>>> and you want to test those new commits. The worktree of the new non-bare
>>> clone can be the document root of your testing virtual host, if that's
>>> what you're doing. That way, you know that no one else is messing with
>>> new non-bare (test repo) like doing development in it and messing up
>>> your tests.
>>
>>
>> To expand on Neals method, if you do git fetch (periodically in a cron job
>> for example) on the cloned non-bare, 'git log HEAD..origin/HEAD' will have
>> output only if the non-bare has new commits.
>>
>>
Previous: Jerome Yanga
Message 15 of 15 in “git push from client is not updating files on server”
  1. Jerome YangaMar 6, 2012
  2. Ben TebulinMar 6, 2012
  3. Junio C HamanoMar 6, 2012
  4. Neal KreitzingerMar 6, 2012
  5. Neal KreitzingerMar 6, 2012
  6. Junio C HamanoMar 6, 2012
  7. Jerome YangaMar 6, 2012
  8. Neal KreitzingerMar 6, 2012
  9. Jerome YangaMar 7, 2012
  10. Neal KreitzingerMar 7, 2012
  11. Junio C HamanoMar 7, 2012
  12. Neal KreitzingerMar 7, 2012
  13. Holger HellmuthMar 7, 2012
  14. Jerome YangaMar 7, 2012
  15. Jerome YangaMar 30, 2012

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.